在有全屏側滑的情況下,頁面上有個slider需要左右滑動的時候,經常在滑動slider的時候頁面也跟著滑動 解決辦法一:關閉當前頁面的全屏側滑,開啟系統側滑 self.fd_interactivePopDisabled = YES; //關閉全屏側滑 self.navigationControlle ...
在有全屏側滑的情況下,頁面上有個slider需要左右滑動的時候,經常在滑動slider的時候頁面也跟著滑動 解決辦法一:關閉當前頁面的全屏側滑,開啟系統側滑
self.fd_interactivePopDisabled = YES; //關閉全屏側滑 self.navigationController.interactivePopGestureRecognizer.enabled = YES; //開啟系統側滑解決辦法二:if (點擊事件在slider上) { 關掉全屏側滑; } else { 開啟全屏側滑; } View上
-(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { UIView *hitView = [super hitTest:point withEvent:event]; if (hitView == _mySlider) { _sliderBlock11(YES); return hitView; } else { _sliderBlock11(NO); return nil; } }ViewController上
__weak ViewController *weakSelf = self;
sliderV.sliderBlock11 = ^ (BOOL aaa){ weakSelf.fd_interactivePopDisabled = aaa; };
Demo:http://i.cnblogs.com/Files.aspx