react-native-navigation的迁移库

RNNSplitViewController.m 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. - (void)waitForReactViewRender:(BOOL)wait perform:(RNNReactViewReadyCompletionBlock)readyBlock {
  28. readyBlock();
  29. }
  30. - (void)mergeOptions:(RNNOptions *)options {
  31. [self.options mergeOptions:options];
  32. }
  33. @end