#import "RNNNavigationController.h" #import "RNNModalAnimation.h" @implementation RNNNavigationController - (UIInterfaceOrientationMask)supportedInterfaceOrientations { return self.viewControllers.lastObject.supportedInterfaceOrientations; } - (BOOL)isCustomTransitioned { return NO; } - (BOOL)isCustomViewController { return [((UIViewController*)self.topViewController) isCustomViewController]; } - (void)mergeOptions:(NSDictionary *)options { [((UIViewController*)self.topViewController) mergeOptions:options]; } - (NSString *)componentId { return _componentId ? _componentId : ((UIViewController*)self.topViewController).componentId; } - (nullable id )animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source { return [[RNNModalAnimation alloc] initWithScreenTransition:self.options.animations.showModal isDismiss:NO]; } - (id)animationControllerForDismissedController:(UIViewController *)dismissed { return [[RNNModalAnimation alloc] initWithScreenTransition:self.options.animations.dismissModal isDismiss:YES]; } - (RNNNavigationOptions *)options { return ((UIViewController*)self.topViewController).options; } - (UIViewController *)childViewControllerForStatusBarStyle { return self.topViewController; } @end