소스 검색

Enable Swipedown to dismiss on bottom aligned notification iOS (#2567)

Michael Kuczera 7 년 전
부모
커밋
05f723122f
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2
    4
      ios/RCCNotification.m

+ 2
- 4
ios/RCCNotification.m 파일 보기

@@ -66,12 +66,10 @@
66 66
 
67 67
 -(UISwipeGestureRecognizerDirection)swipeDirection
68 68
 {
69
-    UISwipeGestureRecognizerDirection direction = UISwipeGestureRecognizerDirectionUp;
69
+    UISwipeGestureRecognizerDirection direction = [self isBottomPosition] ?  UISwipeGestureRecognizerDirectionDown : UISwipeGestureRecognizerDirectionUp;
70 70
     
71 71
     NSString *animationType = [self.params valueForKeyPath:@"animation.type"];
72
-    if ([animationType isEqualToString:@"swing"] || [animationType isEqualToString:@"slide-down"])
73
-        direction = UISwipeGestureRecognizerDirectionUp;
74
-    else if ([animationType isEqualToString:@"slide-left"])
72
+    if ([animationType isEqualToString:@"slide-left"])
75 73
         direction = UISwipeGestureRecognizerDirectionRight;
76 74
     else if ([animationType isEqualToString:@"slide-right"])
77 75
         direction = UISwipeGestureRecognizerDirectionLeft;