react-native-navigation的迁移库

VerticalRotationTransition.m 420B

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