react-native-navigation的迁移库

ElementVerticalTransition.m 380B

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