react-native-navigation的迁移库

RNNTransitionsOptions.m 742B

123456789101112131415161718192021
  1. #import "RNNTransitionsOptions.h"
  2. @implementation RNNTransitionsOptions
  3. - (instancetype)initWithDict:(NSDictionary *)dict {
  4. self = [super init];
  5. [self mergeWith:dict];
  6. return self;
  7. }
  8. - (void)mergeWith:(NSDictionary *)otherOptions {
  9. self.push = otherOptions[@"push"] ? [[RNNScreenTransition alloc] initWithDict:otherOptions[@"push"]] : _push;
  10. self.pop = otherOptions[@"pop"] ? [[RNNScreenTransition alloc] initWithDict:otherOptions[@"pop"]] : _pop;
  11. self.showModal = otherOptions[@"showModal"] ? [[RNNScreenTransition alloc] initWithDict:otherOptions[@"showModal"]] : _showModal;
  12. self.dismissModal = otherOptions[@"dismissModal"] ? [[RNNScreenTransition alloc] initWithDict:otherOptions[@"dismissModal"]] : _dismissModal;
  13. }
  14. @end