123456789101112131415161718192021222324252627 |
-
- #import "InteractivePopGestureDelegate.h"
-
- @implementation InteractivePopGestureDelegate
-
- - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
- if (self.navigationController.viewControllers.count < 2) {
- return NO;
- } else if (self.navigationController.navigationBarHidden) {
- return YES;
- } else if (!self.navigationController.navigationBarHidden && self.originalDelegate == nil) {
- return YES;
- } else {
- return [self.originalDelegate gestureRecognizer:gestureRecognizer shouldReceiveTouch:touch];
- }
- }
-
- - (BOOL)respondsToSelector:(SEL)aSelector {
- if (aSelector == @selector(gestureRecognizer:shouldReceiveTouch:)) {
- return YES;
- } else {
- return [self.originalDelegate respondsToSelector:aSelector];
- }
- }
-
- @end
|