victorBaro/VBFPopFlatButton

Use UIView animation instead of pop?

JonasGessner opened this issue · 2 comments

The POPSpringAnimation can be replaced by [UIView animateWithDuration:delay:usingSpringWithDamping:initialSpringVelocity:options: animations:completion:], which allows you to create spring animations that are very similar to those of a POPSpringAnimations. The advantage of this though is that 1. there is no need for a big 3rd party library (pop), and 2. It isn't tied to CALayers but you can also animate a UIView this way. The fact that the button would no longer rely on pop is a big deal. Pop is a massive library compared to this tiny button library. I really hope that you consider removing pop in favor of the UIKit spring animation. I would be glad to help updating the code!

Hello @JonasGessner
First of all thank you very much for your comment.

I will think about it as soon as I have some spare time. The reason of using Pop SpringAnimation was the fact that Pop automatically 'recalculates' the animation based on current status with no extra work.

I think the best thing I will do is fork my own project using UIViews as you suggest.

Thanks again for your comment!

UIView can do the same if you pass UIViewAnimationOptionBeginFromCurrentState as animation option. So there's really no reason to use pop ;) I've also found pop to lag sometimes while UIView animations are better performance wise and seem to lag less! Thanks for considering to remove pop, it would be really awesome! If you need help let me know.