react-native-navigation的迁移库

RNNAnimationOptions.m 556B

1234567891011121314151617181920212223242526
  1. #import "RNNAnimationOptions.h"
  2. #define DEFAULT_DURATION @(0.7)
  3. #define DEFAULT_SPRING_VELOCITY @(0.8)
  4. #define DEFAULT_SPRING_DAMPING @(0.85)
  5. @implementation RNNAnimationOptions
  6. - (instancetype)initWithDict:(NSDictionary *)dict {
  7. return [super initWithDict:dict];
  8. }
  9. - (NSNumber *)duration {
  10. return _duration ? _duration : DEFAULT_DURATION;
  11. }
  12. - (NSNumber *)springVelocity {
  13. return _springVelocity ? _springVelocity : DEFAULT_SPRING_VELOCITY;
  14. }
  15. - (NSNumber *)springDamping {
  16. return _springDamping ? _springDamping : DEFAULT_SPRING_DAMPING;
  17. }
  18. @end