5

I'm animating a view on the X-axis using Facebook Pop's spring animation. It works fine, except I can't seem to change the speed. It seems that the velocity property is the only way to do this from what I've read, but no values I set for it seem to have any effect. Am I doing something wrong, or is this a bug?

    POPSpringAnimation *anim = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerPositionX];
    anim.velocity = @(100.);
    anim.springBounciness = 15;
    anim.toValue = @(self.scrollView.frame.size.width/2);
    anim.beginTime = .05 * i + CACurrentMediaTime();
    [thisView.layer pop_addAnimation:anim forKey:@"myKey"];
user3654985
  • 123
  • 2
  • 6

2 Answers2

12

try to experiment with those properties (of POPSpringAnimation class):

CGFloat dynamicsFriction
CGFloat dynamicsMass
CGFloat dynamicsTension
Mateusz
  • 1,222
  • 11
  • 22
1

The POPSpringAnimation springSpeed property is probably what you want. It's easier than having to mess with the 3 other lower level properties (as mentioned by Mateusz). It defaults to 12.

patr1ck
  • 964
  • 7
  • 13