react-native-navigation的迁移库

RNNScreenTransition.m 656B

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 = dict[@"enabled"] ? [dict[@"enabled"] boolValue] : YES;
  9. return self;
  10. }
  11. - (BOOL)hasCustomAnimation {
  12. return (self.topBar || self.content || self.bottomTabs);
  13. }
  14. @end