Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RBBSpringAnimation animation doesn't work properly with AVPlayerLayer #20

Open
kostiadombrovsky opened this issue May 26, 2015 · 1 comment

Comments

@kostiadombrovsky
Copy link

Not sure whether this is animation's or Apple's fault but if you attach a RBBSpringAnimation to an AVPlayerLayer weird stuff happens. Same animation works fine everywhere else.

@kostiadombrovsky
Copy link
Author

Funny thing - this hack works:

RBBSpringAnimation* animation = [RBBSpringAnimation animationWithKeyPath: keyPath];
animation.fromValue = fromValue;
animation.toValue = toValue;
animation.velocity  = velocity;
animation.mass      = mass;
animation.damping   = damping;
animation.stiffness = stiffness;
animation.duration = [animation durationForEpsilon: epsilon];


CAKeyframeAnimation* keyframeAnimation = [CAKeyframeAnimation animationWithKeyPath: keyPath];
keyframeAnimation.values   = animation.values;
keyframeAnimation.keyTimes = animation.keyTimes;
keyframeAnimation.duration = animation.duration;
return keyframeAnimation;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant