Browse Source

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

Michael Kuczera 7 years ago
parent
commit
05f723122f
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      ios/RCCNotification.m

+ 2
- 4
ios/RCCNotification.m View File

@@ -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;