react-native-navigation的迁移库

RNNSplitViewController.m 916B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #import "RNNSplitViewController.h"
  2. @interface RNNSplitViewController()
  3. @property (nonatomic) BOOL _optionsApplied;
  4. @property (nonatomic, copy) void (^rotationBlock)(void);
  5. @end
  6. @implementation RNNSplitViewController
  7. -(instancetype)initWithOptions:(RNNSplitViewOptions*)options
  8. withComponentId:(NSString*)componentId
  9. rootViewCreator:(id<RNNRootViewCreator>)creator
  10. eventEmitter:(RNNEventEmitter*)eventEmitter {
  11. self = [super init];
  12. self.componentId = componentId;
  13. self.options = options;
  14. self.eventEmitter = eventEmitter;
  15. self.creator = creator;
  16. self.navigationController.delegate = self;
  17. return self;
  18. }
  19. -(void)viewWillAppear:(BOOL)animated{
  20. [super viewWillAppear:animated];
  21. [self.options applyOn:self];
  22. }
  23. - (UIViewController *)getLeafViewController {
  24. return self;
  25. }
  26. - (void)waitForReactViewRender:(BOOL)wait perform:(RNNReactViewReadyCompletionBlock)readyBlock {
  27. readyBlock();
  28. }
  29. @end