Browse Source

Bugfix - #645 - Swiping / pop gesture on root Screen breaks navigation push / touches (#882)

Ran 7 years ago
parent
commit
03d380f8a9
1 changed files with 1 additions and 22 deletions
  1. 1
    22
      ios/RCCViewController.m

+ 1
- 22
ios/RCCViewController.m View File

@@ -25,7 +25,6 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
25 25
 @property (nonatomic) BOOL _disableBackGesture;
26 26
 @property (nonatomic, strong) NSDictionary *originalNavBarImages;
27 27
 @property (nonatomic, strong) UIImageView *navBarHairlineImageView;
28
-@property (nonatomic, weak) id <UIGestureRecognizerDelegate> originalInteractivePopGestureDelegate;
29 28
 @end
30 29
 
31 30
 @implementation RCCViewController
@@ -470,19 +469,6 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
470 469
   } else {
471 470
     self.navBarHairlineImageView.hidden = NO;
472 471
   }
473
-  
474
-  //Bug fix: in case there is a interactivePopGestureRecognizer, it prevents react-native from getting touch events on the left screen area that the gesture handles
475
-  //overriding the delegate of the gesture prevents this from happening while keeping the gesture intact (another option was to disable it completely by demand)
476
-  self.originalInteractivePopGestureDelegate = nil;
477
-  if (self.navigationController != nil && self.navigationController.interactivePopGestureRecognizer != nil)
478
-  {
479
-    id <UIGestureRecognizerDelegate> interactivePopGestureRecognizer = self.navigationController.interactivePopGestureRecognizer.delegate;
480
-    if (interactivePopGestureRecognizer != nil)
481
-    {
482
-      self.originalInteractivePopGestureDelegate = interactivePopGestureRecognizer;
483
-      self.navigationController.interactivePopGestureRecognizer.delegate = self;
484
-    }
485
-  }
486 472
 }
487 473
 
488 474
 -(void)storeOriginalNavBarImages {
@@ -500,15 +486,8 @@ const NSInteger TRANSPARENT_NAVBAR_TAG = 78264803;
500 486
   
501 487
 }
502 488
 
503
--(void)setStyleOnDisappear
504
-{
489
+-(void)setStyleOnDisappear {
505 490
   self.navBarHairlineImageView.hidden = NO;
506
-  
507
-  if (self.navigationController != nil && self.navigationController.interactivePopGestureRecognizer != nil && self.originalInteractivePopGestureDelegate != nil)
508
-  {
509
-    self.navigationController.interactivePopGestureRecognizer.delegate = self.originalInteractivePopGestureDelegate;
510
-    self.originalInteractivePopGestureDelegate = nil;
511
-  }
512 491
 }
513 492
 
514 493
 // only styles that can't be set on willAppear should be set here