소스 검색

Bugfix #930: change IF condition to make sure the originalInteractivePopGestureDelegate property contains value correctly. (#1763)

Thanh Le 8 년 전
부모
커밋
9698578129
1개의 변경된 파일1개의 추가작업 그리고 2개의 파일을 삭제
  1. 1
    2
      ios/RCCViewController.m

+ 1
- 2
ios/RCCViewController.m 파일 보기

585
   
585
   
586
  //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
586
  //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
587
  //overriding the delegate of the gesture prevents this from happening while keeping the gesture intact (another option was to disable it completely by demand)
587
  //overriding the delegate of the gesture prevents this from happening while keeping the gesture intact (another option was to disable it completely by demand)
588
- self.originalInteractivePopGestureDelegate = nil;
589
  if(self.navigationController.viewControllers.count > 1){
588
  if(self.navigationController.viewControllers.count > 1){
590
    if (self.navigationController != nil && self.navigationController.interactivePopGestureRecognizer != nil)
589
    if (self.navigationController != nil && self.navigationController.interactivePopGestureRecognizer != nil)
591
    {
590
    {
592
      id <UIGestureRecognizerDelegate> interactivePopGestureRecognizer = self.navigationController.interactivePopGestureRecognizer.delegate;
591
      id <UIGestureRecognizerDelegate> interactivePopGestureRecognizer = self.navigationController.interactivePopGestureRecognizer.delegate;
593
-     if (interactivePopGestureRecognizer != nil)
592
+     if (interactivePopGestureRecognizer != nil && interactivePopGestureRecognizer != self)
594
      {
593
      {
595
        self.originalInteractivePopGestureDelegate = interactivePopGestureRecognizer;
594
        self.originalInteractivePopGestureDelegate = interactivePopGestureRecognizer;
596
        self.navigationController.interactivePopGestureRecognizer.delegate = self;
595
        self.navigationController.interactivePopGestureRecognizer.delegate = self;