Daniel Zlotin 7 лет назад
Родитель
Сommit
829017db6f

+ 1
- 1
lib/ios/RNNAnimator.m Просмотреть файл

@@ -147,7 +147,7 @@
147 147
 {
148 148
 	UIViewController* toVC   = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
149 149
 	UIViewController* fromVC  = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
150
-	UIView* componentView = [transitionContext componentView];
150
+	UIView* componentView = [transitionContext containerView];
151 151
 	self.fromVC = fromVC;
152 152
 	self.toVC = toVC;
153 153
 	toVC.view.frame = fromVC.view.frame;

+ 7
- 7
lib/ios/RNNInteractivePopAnimator.m Просмотреть файл

@@ -90,7 +90,7 @@
90 90
 	return YES;
91 91
 }
92 92
 - (void)animationEnded:(BOOL)transitionCompleted {
93
-	
93
+
94 94
 }
95 95
 
96 96
 - (NSTimeInterval)transitionDuration:(id <UIViewControllerContextTransitioning>)transitionContext
@@ -104,8 +104,8 @@
104 104
 	self.transitionContext = transitionContext;
105 105
 	UIViewController* toVC   = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
106 106
 	UIViewController* fromVC  = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
107
-	UIView* componentView = [transitionContext componentView];
108
-	
107
+	UIView* componentView = [transitionContext containerView];
108
+
109 109
 	toVC.view.frame = fromVC.view.frame;
110 110
 	UIView* topViewContent = [self.topView subviews][0];
111 111
 	UIImage* image = [[self.topView subviews][0] image];
@@ -143,7 +143,7 @@
143 143
 								  if (![transitionContext transitionWasCancelled]) {
144 144
 									  [componentView addSubview: toVC.view];
145 145
 									  [transitionContext completeTransition:![transitionContext transitionWasCancelled]];
146
-									  
146
+
147 147
 								  }
148 148
 								  if ([transitionContext transitionWasCancelled]) {
149 149
 									  [self.topView setHidden:NO];
@@ -157,15 +157,15 @@
157 157
 								  animationControllerForOperation:(UINavigationControllerOperation)operation
158 158
 											   fromViewController:(UIViewController*)fromVC
159 159
 												 toViewController:(UIViewController*)toVC {
160
-	
160
+
161 161
 		if (operation == UINavigationControllerOperationPop) {
162 162
 			return self;
163 163
 		} else {
164 164
 			return nil;
165 165
 		}
166
-	
166
+
167 167
 	return nil;
168
-	
168
+
169 169
 }
170 170
 - (id<UIViewControllerInteractiveTransitioning>)navigationController:(UINavigationController *)navigationController
171 171
 						 interactionControllerForAnimationController:(id<UIViewControllerAnimatedTransitioning>)animationController {

+ 3
- 3
lib/ios/ReactNativeNavigationTests/RNNControllerFactoryTest.m Просмотреть файл

@@ -46,7 +46,7 @@
46 46
 - (void)testCreateLayout_ComponentStackLayout {
47 47
 	id ans = [self.factory createLayoutAndSaveToStore:
48 48
 			  @{@"id": @"cntId",
49
-				@"type": @"ComponentStack",
49
+				@"type": @"Stack",
50 50
 				@"data": @{},
51 51
 				@"children": @[]}];
52 52
 	XCTAssertTrue([ans isMemberOfClass:[RNNNavigationController class]]);
@@ -55,7 +55,7 @@
55 55
 - (void)testCreateLayout_ComponentStackLayoutRecursive {
56 56
 	RNNNavigationController* ans = (RNNNavigationController*) [self.factory createLayoutAndSaveToStore:
57 57
 															 @{@"id": @"cntId",
58
-															   @"type": @"ComponentStack",
58
+															   @"type": @"Stack",
59 59
 															   @"data": @{},
60 60
 															   @"children": @[
61 61
 																	   @{@"id": @"cntId_2",
@@ -76,7 +76,7 @@
76 76
 														  @"data": @{},
77 77
 														  @"children": @[
78 78
 																  @{@"id": @"cntId_2",
79
-																	@"type": @"ComponentStack",
79
+																	@"type": @"Stack",
80 80
 																	@"data": @{},
81 81
 																	@"children": @[
82 82
 																			@{@"id": @"cntId_3",