react-native-navigation的迁移库

RNNScreenTransition.m 708B

12345678910111213141516171819202122
  1. #import "RNNScreenTransition.h"
  2. @implementation RNNScreenTransition
  3. - (instancetype)initWithDict:(NSDictionary *)dict {
  4. self = [super init];
  5. self.topBar = dict[@"topBar"] ? [[RNNTransitionStateHolder alloc] initWithDict:dict[@"topBar"]] : nil;
  6. self.content = dict[@"content"] ? [[RNNTransitionStateHolder alloc] initWithDict:dict[@"content"]] : nil;
  7. self.bottomTabs = dict[@"bottomTabs"] ? [[RNNTransitionStateHolder alloc] initWithDict:dict[@"bottomTabs"]] : nil;
  8. self.enable = [BoolParser parse:dict key:@"enabled"];
  9. self.waitForRender = [BoolParser parse:dict key:@"waitForRender"];
  10. return self;
  11. }
  12. - (BOOL)hasCustomAnimation {
  13. return (self.topBar || self.content || self.bottomTabs);
  14. }
  15. @end