react-native-navigation的迁移库

RNNSplitViewController.m 1002B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. - (void)mergeOptions:(RNNOptions *)options {
  30. [self.options mergeOptions:options];
  31. }
  32. @end