固予

和MMDrawerController的手势冲突

2016-09-23  本文已影响57人  出门请右拐

今天在写自定义的cell左划操作,但是因为用了第三方MMDrawerController,cell的左划手势没有反应,只能划出MMDrawerController的侧边。
解决方法:
修改MMDrawerController.m内的方法-isPointContainedWithinCenterViewContentRect:
如下:

-(BOOL)isPointContainedWithinCenterViewContentRect:(CGPoint)point{
    CGRect centerViewContentRect = CGRectMake(0, 0, 50.0, self.centerContainerView.height);
// 修改前:CGRect centerViewContentRect = self.centerContainerView.frame;
    centerViewContentRect = CGRectIntersection(centerViewContentRect,self.childControllerContainerView.bounds);
    return (CGRectContainsPoint(centerViewContentRect, point) &&
            [self isPointContainedWithinNavigationRect:point] == NO);
}
上一篇 下一篇

猜你喜欢

热点阅读