react-native-navigation的迁移库

RNNSplitViewController.m 1.1KB

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