react-native-navigation的迁移库

HorizontalTranslationTransition.m 402B

123456789101112131415
  1. #import "HorizontalTranslationTransition.h"
  2. @implementation HorizontalTranslationTransition
  3. - (CATransform3D)animateWithProgress:(CGFloat)p {
  4. CGFloat x = [RNNInterpolator fromFloat:self.from + self.to 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