react-native-navigation的迁移库

RNNNavigationController.m 690B

12345678910111213141516171819202122232425262728
  1. #import "RNNNavigationController.h"
  2. @implementation RNNNavigationController
  3. - (UIInterfaceOrientationMask)supportedInterfaceOrientations {
  4. return self.viewControllers.lastObject.supportedInterfaceOrientations;
  5. }
  6. - (BOOL)isCustomTransitioned {
  7. return NO;
  8. }
  9. - (BOOL)isAnimated {
  10. UIViewController<RNNRootViewProtocol>* rootVC = (UIViewController<RNNRootViewProtocol>*) self.topViewController;
  11. return rootVC.isAnimated;
  12. }
  13. - (void)mergeOptions:(NSDictionary *)options {
  14. [((UIViewController<RNNRootViewProtocol>*)self.topViewController) mergeOptions:options];
  15. }
  16. - (NSString *)componentId {
  17. return ((UIViewController<RNNRootViewProtocol>*)self.topViewController).componentId;
  18. }
  19. @end