react-native-navigation的迁移库

RNNExternalViewController.m 929B

1234567891011121314151617181920212223242526
  1. #import "RNNExternalViewController.h"
  2. @implementation RNNExternalViewController
  3. - (instancetype)initWithLayoutInfo:(RNNLayoutInfo *)layoutInfo eventEmitter:(RNNEventEmitter *)eventEmitter presenter:(RNNComponentPresenter *)presenter options:(RNNNavigationOptions *)options defaultOptions:(RNNNavigationOptions *)defaultOptions viewController:(UIViewController *)viewController {
  4. self = [super initWithLayoutInfo:layoutInfo rootViewCreator:nil eventEmitter:eventEmitter presenter:presenter options:options defaultOptions:defaultOptions];
  5. [self bindViewController:viewController];
  6. return self;
  7. }
  8. - (void)bindViewController:(UIViewController *)viewController {
  9. [self addChildViewController:viewController];
  10. [self.view addSubview:viewController.view];
  11. [viewController didMoveToParentViewController:self];
  12. }
  13. - (void)loadView {
  14. self.view = [UIView new];
  15. }
  16. - (void)render {
  17. [self readyForPresentation];
  18. }
  19. @end