react-native-navigation的迁移库

TransitionDetailsOptions.m 561B

12345678910111213141516171819202122
  1. #import "TransitionDetailsOptions.h"
  2. @implementation TransitionDetailsOptions
  3. - (instancetype)initWithDict:(NSDictionary *)dict {
  4. self = [super init];
  5. self.from = [DoubleParser parse:dict key:@"from"];
  6. self.to = [DoubleParser parse:dict key:@"to"];
  7. self.startDelay = [TimeIntervalParser parse:dict key:@"startDelay"];
  8. self.duration = [TimeIntervalParser parse:dict key:@"duration"];
  9. self.interpolation = [TextParser parse:dict key:@"interpolation"];
  10. return self;
  11. }
  12. - (BOOL)hasAnimation {
  13. return self.from.hasValue || self.to.hasValue;
  14. }
  15. @end