美文网首页固予
和MMDrawerController的手势冲突

和MMDrawerController的手势冲突

作者: 出门请右拐 | 来源:发表于2016-09-23 12:52 被阅读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);
}

相关文章

网友评论

    本文标题:和MMDrawerController的手势冲突

    本文链接:https://www.haomeiwen.com/subject/tnytyttx.html