react-native-navigation的迁移库

RNNScreenTransition.m 744B

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