react-native-navigation的迁移库

RNNComponentViewController+Utils.m 805B

1234567891011121314151617
  1. #import "RNNComponentViewController+Utils.h"
  2. #import "RNNTestRootViewCreator.h"
  3. @implementation RNNComponentViewController (Utils)
  4. + (RNNComponentViewController *)createWithComponentId:(NSString *)componentId initialOptions:(RNNNavigationOptions *)initialOptions {
  5. RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] init];
  6. layoutInfo.componentId = componentId;
  7. return [[RNNComponentViewController alloc] initWithLayoutInfo:layoutInfo rootViewCreator:[[RNNTestRootViewCreator alloc] init] eventEmitter:nil presenter:[[RNNComponentPresenter alloc] initWithComponentRegistry:nil defaultOptions:nil] options:initialOptions defaultOptions:nil];
  8. }
  9. + (RNNComponentViewController *)createWithComponentId:(NSString *)componentId {
  10. return [self createWithComponentId:componentId initialOptions:nil];
  11. }
  12. @end