react-native-navigation的迁移库

RNNParentOptionsResolver.m 499B

1234567891011121314
  1. #import "RNNParentOptionsResolver.h"
  2. @implementation RNNParentOptionsResolver
  3. - (void)resolve:(UIViewController<RNNLayoutProtocol> *)parent with:(NSArray<UIViewController<RNNLayoutProtocol> *> *)children {
  4. for (UIViewController<RNNLayoutProtocol>* child in parent.childViewControllers) {
  5. if ([parent conformsToProtocol:@protocol(RNNLayoutProtocol)] && [child conformsToProtocol:@protocol(RNNLayoutProtocol)]) {
  6. [parent.options mergeOptions:child.options overrideOptions:YES];
  7. }
  8. }
  9. }
  10. @end