Browse Source

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

Michael Kuczera 6 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
 
66
 
67
 -(UISwipeGestureRecognizerDirection)swipeDirection
67
 -(UISwipeGestureRecognizerDirection)swipeDirection
68
 {
68
 {
69
-    UISwipeGestureRecognizerDirection direction = UISwipeGestureRecognizerDirectionUp;
69
+    UISwipeGestureRecognizerDirection direction = [self isBottomPosition] ?  UISwipeGestureRecognizerDirectionDown : UISwipeGestureRecognizerDirectionUp;
70
     
70
     
71
     NSString *animationType = [self.params valueForKeyPath:@"animation.type"];
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
         direction = UISwipeGestureRecognizerDirectionRight;
73
         direction = UISwipeGestureRecognizerDirectionRight;
76
     else if ([animationType isEqualToString:@"slide-right"])
74
     else if ([animationType isEqualToString:@"slide-right"])
77
         direction = UISwipeGestureRecognizerDirectionLeft;
75
         direction = UISwipeGestureRecognizerDirectionLeft;