react-native-navigation的迁移库

RNNSplitViewController.m 917B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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)mergeOptions:(NSDictionary *)options {
  28. [self.options mergeIfEmptyWith:options];
  29. }
  30. @end