react-native-navigation的迁移库

RNNBasePresenter.m 828B

123456789101112131415161718192021222324252627282930313233
  1. #import "RNNBasePresenter.h"
  2. @implementation RNNBasePresenter
  3. - (instancetype)initWithOptions:(RNNNavigationOptions *)options {
  4. self = [super init];
  5. if (self) {
  6. self.options = options;
  7. }
  8. return self;
  9. }
  10. - (void)presentOn:(UIViewController *)viewController {
  11. [self.options applyOn:viewController];
  12. }
  13. - (void)present:(RNNNavigationOptions *)options on:(UIViewController *)viewController {
  14. [options applyOn:viewController];
  15. }
  16. - (RNNNavigationOptions *)presentWithChildOptions:(RNNNavigationOptions *)childOptions on:(UIViewController *)viewController {
  17. RNNNavigationOptions* options = [self.options combineWithOptions:childOptions];
  18. [self present:options on:viewController];
  19. return options;
  20. }
  21. - (void)overrideOptions:(RNNNavigationOptions *)options {
  22. [_options mergeOptions:options overrideOptions:YES];
  23. }
  24. @end