當咱們在ViewController中有scrollView的時候, 可能會遇到右滑沒法響應返回手勢, 有如下解決辦法:spa
自定義scrollView, 實現該scrollView的如下方法便可:3d
@implementation GOfflineContentScrollViewit
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizerio
{class
// 首先判斷otherGestureRecognizer是否是系統pop手勢scroll
if ([otherGestureRecognizer.view isKindOfClass:NSClassFromString(@"UILayoutContainerView")]) {方法
// 再判斷系統手勢的state是began仍是fail,同時判斷scrollView的位置是否是正好在最左邊im
if (otherGestureRecognizer.state == UIGestureRecognizerStateBegan && self.contentOffset.x == 0) {margin
return YES;view
}
}
return NO;
}
@end