Browse Source

Rename enabled to enable in animation options - ios

yogevbd 6 years ago
parent
commit
44b105fdf6

+ 2
- 2
lib/ios/RNNModalManager.m View File

@@ -25,7 +25,7 @@
25 25
 	if (topVC.options.animations.showModal.hasCustomAnimation) {
26 26
 		self.toVC.transitioningDelegate = topVC;
27 27
 	}
28
-	[topVC presentViewController:self.toVC animated:self.toVC.options.animations.showModal.enabled completion:^{
28
+	[topVC presentViewController:self.toVC animated:self.toVC.options.animations.showModal.enable completion:^{
29 29
 		if (_completionBlock) {
30 30
 			_completionBlock();
31 31
 			_completionBlock = nil;
@@ -74,7 +74,7 @@
74 74
 	}
75 75
 	
76 76
 	if (modalToDismiss == topPresentedVC || [[topPresentedVC childViewControllers] containsObject:modalToDismiss]) {
77
-		[modalToDismiss dismissViewControllerAnimated:modalToDismiss.options.animations.dismissModal.enabled completion:^{
77
+		[modalToDismiss dismissViewControllerAnimated:modalToDismiss.options.animations.dismissModal.enable completion:^{
78 78
 			[[_store pendingModalIdsToDismiss] removeObject:componentId];
79 79
 			[_store removeComponent:componentId];
80 80
 			[self removePendingNextModalIfOnTop];

+ 7
- 7
lib/ios/RNNNavigationStackManager.m View File

@@ -57,7 +57,7 @@ dispatch_queue_t RCTGetUIManagerQueue(void);
57 57
 		}
58 58
 	}];
59 59
 	
60
-	[[self.fromVC navigationController] pushViewController:self.toVC animated:self.toVC.options.animations.push.enabled];
60
+	[[self.fromVC navigationController] pushViewController:self.toVC animated:self.toVC.options.animations.push.enable];
61 61
 	[CATransaction commit];
62 62
 	
63 63
 	self.toVC = nil;
@@ -71,15 +71,15 @@ dispatch_queue_t RCTGetUIManagerQueue(void);
71 71
 	if ([nvc topViewController] == vc) {
72 72
 		if (vc.options.animations.pop) {
73 73
 			nvc.delegate = vc;
74
-			[nvc popViewControllerAnimated:vc.options.animations.pop.enabled];
74
+			[nvc popViewControllerAnimated:vc.options.animations.pop.enable];
75 75
 		} else {
76 76
 			nvc.delegate = nil;
77
-			[nvc popViewControllerAnimated:vc.options.animations.pop.enabled];
77
+			[nvc popViewControllerAnimated:vc.options.animations.pop.enable];
78 78
 		}
79 79
 	} else {
80 80
 		NSMutableArray * vcs = nvc.viewControllers.mutableCopy;
81 81
 		[vcs removeObject:vc];
82
-		[nvc setViewControllers:vcs animated:vc.options.animations.pop.enabled];
82
+		[nvc setViewControllers:vcs animated:vc.options.animations.pop.enable];
83 83
 	}
84 84
 	[_store removeComponent:componentId];
85 85
 }
@@ -90,7 +90,7 @@ dispatch_queue_t RCTGetUIManagerQueue(void);
90 90
 	if (vc) {
91 91
 		UINavigationController *nvc = [vc navigationController];
92 92
 		if(nvc) {
93
-			NSArray *poppedVCs = [nvc popToViewController:vc animated:vc.options.animations.pop.enabled];
93
+			NSArray *poppedVCs = [nvc popToViewController:vc animated:vc.options.animations.pop.enable];
94 94
 			[self removePopedViewControllers:poppedVCs];
95 95
 		}
96 96
 	}
@@ -99,7 +99,7 @@ dispatch_queue_t RCTGetUIManagerQueue(void);
99 99
 -(void)popToRoot:(NSString*)componentId {
100 100
 	RNNRootViewController *vc = (RNNRootViewController*)[_store findComponentForId:componentId];
101 101
 	UINavigationController* nvc = [vc navigationController];
102
-	NSArray* poppedVCs = [nvc popToRootViewControllerAnimated:vc.options.animations.pop.enabled];
102
+	NSArray* poppedVCs = [nvc popToRootViewControllerAnimated:vc.options.animations.pop.enable];
103 103
 	[self removePopedViewControllers:poppedVCs];
104 104
 }
105 105
 
@@ -113,7 +113,7 @@ dispatch_queue_t RCTGetUIManagerQueue(void);
113 113
 		}
114 114
 	}];
115 115
 	
116
-	[nvc setViewControllers:@[newRoot] animated:newRoot.options.animations.push.enabled];
116
+	[nvc setViewControllers:@[newRoot] animated:newRoot.options.animations.push.enable];
117 117
 	
118 118
 	[CATransaction commit];
119 119
 }

+ 1
- 1
lib/ios/RNNScreenTransition.h View File

@@ -7,7 +7,7 @@
7 7
 @property (nonatomic, strong) RNNTransitionStateHolder* content;
8 8
 @property (nonatomic, strong) RNNTransitionStateHolder* bottomTabs;
9 9
 
10
-@property (nonatomic) BOOL enabled;
10
+@property (nonatomic) BOOL enable;
11 11
 
12 12
 - (BOOL)hasCustomAnimation;
13 13
 

+ 1
- 1
lib/ios/RNNScreenTransition.m View File

@@ -9,7 +9,7 @@
9 9
 	self.content = dict[@"content"] ? [[RNNTransitionStateHolder alloc] initWithDict:dict[@"content"]] : nil;
10 10
 	self.bottomTabs = dict[@"bottomTabs"] ? [[RNNTransitionStateHolder alloc] initWithDict:dict[@"bottomTabs"]] : nil;
11 11
 
12
-	self.enabled = dict[@"enabled"] ? [dict[@"enabled"] boolValue] : YES;
12
+	self.enable = dict[@"enabled"] ? [dict[@"enabled"] boolValue] : YES;
13 13
 
14 14
 	return self;
15 15
 }

+ 1
- 1
playground/src/screens/WelcomeScreen.js View File

@@ -304,7 +304,7 @@ class WelcomeScreen extends Component {
304 304
         options: {
305 305
           animations: {
306 306
             push: {
307
-              enabled: false
307
+              enable: false
308 308
             }
309 309
           }
310 310
         }