react-native-navigation的迁移库

RotationTransition.m 345B

123456789101112
  1. #import "RotationTransition.h"
  2. @implementation RotationTransition
  3. - (CATransform3D)animateWithProgress:(CGFloat)p {
  4. double degrees = [RNNInterpolator fromFloat:self.from toFloat:self.to precent:p interpolation:self.interpolation];
  5. double rads = DEGREES_TO_RADIANS(degrees);
  6. return CATransform3DMakeRotation(rads, 0, 0, 1);
  7. }
  8. @end