react-native-navigation的迁移库

ElementHorizontalTransition.m 384B

123456789101112131415
  1. #import "ElementHorizontalTransition.h"
  2. @implementation ElementHorizontalTransition
  3. - (CATransform3D)animateWithProgress:(CGFloat)p {
  4. CGFloat x = [RNNInterpolator fromFloat:self.from toFloat:self.to precent:p interpolation:self.interpolation];
  5. return CATransform3DMakeTranslation(x - self.to, 0, 0);
  6. }
  7. - (CGFloat)initialValue {
  8. return self.view.frame.origin.x;
  9. }
  10. @end