123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
-
- #import "RNNNavigationController.h"
- #import "RNNModalAnimation.h"
-
- @implementation RNNNavigationController
-
- - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
- return self.viewControllers.lastObject.supportedInterfaceOrientations;
- }
-
- - (UINavigationController *)navigationController {
- return self;
- }
-
- - (UIStatusBarStyle)preferredStatusBarStyle {
- return self.getLeafViewController.preferredStatusBarStyle;
- }
-
- - (UIModalPresentationStyle)modalPresentationStyle {
- return self.getLeafViewController.modalPresentationStyle;
- }
-
- - (UIViewController *)popViewControllerAnimated:(BOOL)animated {
- return [super popViewControllerAnimated:animated];
- }
-
- - (NSString *)componentId {
- return _componentId ? _componentId : self.getLeafViewController.componentId;
- }
-
- - (nullable id <UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source {
- return [[RNNModalAnimation alloc] initWithScreenTransition:self.getLeafViewController.options.animations.showModal isDismiss:NO];
- }
-
- - (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed {
- return [[RNNModalAnimation alloc] initWithScreenTransition:self.getLeafViewController.options.animations.dismissModal isDismiss:YES];
- }
-
- - (UIViewController *)getLeafViewController {
- return ((UIViewController<RNNRootViewProtocol>*)self.topViewController);
- }
-
- - (UIViewController *)childViewControllerForStatusBarStyle {
- return self.topViewController;
- }
-
- @end
|