react-native-navigation的迁移库

InteractivePopGestureDelegate.m 668B

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