今天在寫自定義的cell左劃操作,但是因為用了第三方MMDrawerController,cell的左劃手勢沒有反應(yīng),只能劃出MMDrawerController的側(cè)邊。
解決方法:
修改MMDrawerController.m內(nèi)的方法-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);
}