react-native-navigation的迁移库

InteractivePopGestureDelegate.m 775B

123456789101112131415161718192021222324252627
  1. #import "InteractivePopGestureDelegate.h"
  2. @implementation InteractivePopGestureDelegate
  3. - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {
  4. if (self.navigationController.viewControllers.count < 2) {
  5. return NO;
  6. } else if (self.navigationController.navigationBarHidden) {
  7. return YES;
  8. } else if (!self.navigationController.navigationBarHidden && self.originalDelegate == nil) {
  9. return YES;
  10. } else {
  11. return [self.originalDelegate gestureRecognizer:gestureRecognizer shouldReceiveTouch:touch];
  12. }
  13. }
  14. - (BOOL)respondsToSelector:(SEL)aSelector {
  15. if (aSelector == @selector(gestureRecognizer:shouldReceiveTouch:)) {
  16. return YES;
  17. } else {
  18. return [self.originalDelegate respondsToSelector:aSelector];
  19. }
  20. }
  21. @end