#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]; } - (BOOL)isAnimated { UIViewController* rootVC = (UIViewController*) self.topViewController; return rootVC.isAnimated; } - (void)mergeOptions:(NSDictionary *)options { [((UIViewController*)self.topViewController) mergeOptions:options]; } - (NSString *)componentId { return ((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; } @end