|
@@ -143,21 +143,60 @@ NSString const *CALLBACK_ASSOCIATED_ID = @"RCCNavigationController.CALLBACK_ASSO
|
143
|
143
|
[self setButtons:rightButtons viewController:viewController side:@"right" animated:NO];
|
144
|
144
|
}
|
145
|
145
|
|
146
|
|
- [self pushViewController:viewController animated:animated];
|
|
146
|
+ NSString *animationType = actionParams[@"animationType"];
|
|
147
|
+ if ([animationType isEqualToString:@"fade"])
|
|
148
|
+ {
|
|
149
|
+ CATransition *transition = [CATransition animation];
|
|
150
|
+ transition.duration = 0.25;
|
|
151
|
+ transition.type = kCATransitionFade;
|
|
152
|
+
|
|
153
|
+ [self.view.layer addAnimation:transition forKey:kCATransition];
|
|
154
|
+ [self pushViewController:viewController animated:NO];
|
|
155
|
+ }
|
|
156
|
+ else
|
|
157
|
+ {
|
|
158
|
+ [self pushViewController:viewController animated:animated];
|
|
159
|
+ }
|
147
|
160
|
return;
|
148
|
161
|
}
|
149
|
162
|
|
150
|
163
|
// pop
|
151
|
164
|
if ([performAction isEqualToString:@"pop"])
|
152
|
165
|
{
|
153
|
|
- [self popViewControllerAnimated:animated];
|
|
166
|
+ NSString *animationType = actionParams[@"animationType"];
|
|
167
|
+ if ([animationType isEqualToString:@"fade"])
|
|
168
|
+ {
|
|
169
|
+ CATransition *transition = [CATransition animation];
|
|
170
|
+ transition.duration = 0.25;
|
|
171
|
+ transition.type = kCATransitionFade;
|
|
172
|
+
|
|
173
|
+ [self.view.layer addAnimation:transition forKey:kCATransition];
|
|
174
|
+ [self popViewControllerAnimated:NO];
|
|
175
|
+ }
|
|
176
|
+ else
|
|
177
|
+ {
|
|
178
|
+ [self popViewControllerAnimated:animated];
|
|
179
|
+ }
|
154
|
180
|
return;
|
155
|
181
|
}
|
156
|
182
|
|
157
|
183
|
// popToRoot
|
158
|
184
|
if ([performAction isEqualToString:@"popToRoot"])
|
159
|
185
|
{
|
160
|
|
- [self popToRootViewControllerAnimated:animated];
|
|
186
|
+ NSString *animationType = actionParams[@"animationType"];
|
|
187
|
+ if ([animationType isEqualToString:@"fade"])
|
|
188
|
+ {
|
|
189
|
+ CATransition *transition = [CATransition animation];
|
|
190
|
+ transition.duration = 0.25;
|
|
191
|
+ transition.type = kCATransitionFade;
|
|
192
|
+
|
|
193
|
+ [self.view.layer addAnimation:transition forKey:kCATransition];
|
|
194
|
+ [self popToRootViewControllerAnimated:NO];
|
|
195
|
+ }
|
|
196
|
+ else
|
|
197
|
+ {
|
|
198
|
+ [self popToRootViewControllerAnimated:animated];
|
|
199
|
+ }
|
161
|
200
|
return;
|
162
|
201
|
}
|
163
|
202
|
|
|
@@ -189,7 +228,20 @@ NSString const *CALLBACK_ASSOCIATED_ID = @"RCCNavigationController.CALLBACK_ASSO
|
189
|
228
|
|
190
|
229
|
BOOL animated = actionParams[@"animated"] ? [actionParams[@"animated"] boolValue] : YES;
|
191
|
230
|
|
192
|
|
- [self setViewControllers:@[viewController] animated:animated];
|
|
231
|
+ NSString *animationType = actionParams[@"animationType"];
|
|
232
|
+ if ([animationType isEqualToString:@"fade"])
|
|
233
|
+ {
|
|
234
|
+ CATransition *transition = [CATransition animation];
|
|
235
|
+ transition.duration = 0.25;
|
|
236
|
+ transition.type = kCATransitionFade;
|
|
237
|
+
|
|
238
|
+ [self.view.layer addAnimation:transition forKey:kCATransition];
|
|
239
|
+ [self setViewControllers:@[viewController] animated:NO];
|
|
240
|
+ }
|
|
241
|
+ else
|
|
242
|
+ {
|
|
243
|
+ [self setViewControllers:@[viewController] animated:animated];
|
|
244
|
+ }
|
193
|
245
|
return;
|
194
|
246
|
}
|
195
|
247
|
|