zrxq / UIView-EasingFunctions

A category on UIView that allows to use custom easing functions with block-based animations.
Other
665 stars 55 forks source link

Preload Animations #9

Closed refactornator closed 10 years ago

refactornator commented 10 years ago

The first time my UIView+EasingFunctions animations run, it always seems to lag/stutter and show up midway through. Would it be possible to preload any animation data that UIView+EasingFunctions has to perform the first time the animation is performed? Or is this an optimization I need to perform in my own code?

I posted a question on SO in case this is more of an iOS issue than specifically UIView+EasingFunctions.

zrxq commented 10 years ago

I'm not sure I've ever seen exactly this behaviour before. I don't want to dismiss the issue as likely having nothing to do with the EasingFunctions, but I might needs some more details to be able to help.

Are there any CIFilters involved? How large/complex is the animated UIView? How long is the animation (i.e. the duration)? Could you please provide a sample project showcasing the issue?

refactornator commented 10 years ago

I think I figured it out. I was doing multiple animations at the same time: fading in a blurred background image as well as animating a uiview sliding into view and I resolved this issue by doing them in the same animation block. So, it sounds like the answer is that it is not possible to "preload" animations as I described, and it will probably require tweaking on a case by case basis.

Thanks