Is there a way to use the Core Animation timers?
I have a CALayer which its position needs to be recomputed as often as possible. I'm currently using a NSTimer for that matter, but I would prefer to hook myself into Core Animation directly.
When you add an animation to a layer, the values are refreshed as often as possible without any timers. Is there any way to u开发者_开发技巧se this mechanism? I was thinking about rolling my own CAAnimation subclass, but that doesn't seem to be feasible.
Any help would be appreciated.
Check CADisplayLink.
If you want to support devices ≤ 3.0, you need to use the undocumented GSHeartbeat. I do not recommend this even if you target for Jailbroken devices.
精彩评论