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