react-native-navigation的迁移库

RNNDefaultOptionsHelper.m 611B

12345678910111213141516
  1. #import "RNNDefaultOptionsHelper.h"
  2. @implementation RNNDefaultOptionsHelper
  3. + (void)recrusivelySetDefaultOptions:(RNNNavigationOptions *)defaultOptions onRootViewController:(UIViewController *)rootViewController {
  4. if ([rootViewController conformsToProtocol:@protocol(RNNLayoutProtocol)]) {
  5. [((UIViewController<RNNLayoutProtocol> *)rootViewController) setDefaultOptions:defaultOptions];
  6. }
  7. for (UIViewController<RNNLayoutProtocol>* childViewController in rootViewController.childViewControllers) {
  8. [self recrusivelySetDefaultOptions:defaultOptions onRootViewController:childViewController];
  9. }
  10. }
  11. @end