Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

加了侧滑驱动后好像与百度地图手势有冲突 #72

Open
shenhaojicool opened this issue Jun 1, 2018 · 3 comments
Open

加了侧滑驱动后好像与百度地图手势有冲突 #72

shenhaojicool opened this issue Jun 1, 2018 · 3 comments

Comments

@shenhaojicool
Copy link

// 注册手势驱动 ,Gesture:YES表示只在边缘响应,防止与地图的拖动冲突
__weak typeof(self)weakSelf = self;
[self cw_registerShowIntractiveWithEdgeGesture:YES transitionDirectionAutoBlock:^(CWDrawerTransitionDirection direction) {
if (direction == CWDrawerTransitionFromLeft) { // 左侧滑出
[weakSelf leftClick];
}
}];

/** 地图 */
_mapView = [[BMKMapView alloc] initWithFrame:self.view.bounds];
[self.view addSubview:_mapView];

========================================================

ITStaffTableViewController *vc = [[ITStaffTableViewController alloc] init];
vc.drawerType = DrawerTypeMaskLeft;
// 调用这个方法
[self cw_showDrawerViewController:vc animationType:CWDrawerAnimationTypeMask configuration:nil];

分割线下面的是左滑要展现的视图

现在遇到的问题是,加了侧滑之后。我拖地图每次只能拖动一点点。地图是按百度官方文档上的,就展示了地图,其他功能还没加。

@ChavezChen
Copy link
Owner

有demo提供么?这种手势的问题没有代码不好解决哦,,不注册手势的情况下是正常的吗?

@ChavezChen
Copy link
Owner

你可以试试在CWInteractiveTransition.m 的pan手势的代理做对应的调整看看。。一般手势冲突 都可以通过代理来处理。

@dlwj15
Copy link

dlwj15 commented Aug 2, 2018

实现笔者的这方法

  • (BOOL)cw_gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    // 添加这两行代码,即可以解决与百度地图的时候冲突
    gestureRecognizer.cancelsTouchesInView = NO;
    gestureRecognizer.delaysTouchesEnded = NO;
    return YES;
    }
    还有问题请告知!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants