Repeat count for UIView block-based animation

人盡茶涼 提交于 2019-12-04 01:06:59

Set a completion callback - re-initiate the animation in it - and keep track of the counter yourself.

PommeOuest

I just asked a similar question and then I read the 2010-11-15 release of the View Programming Guide for iOS. Page 64 caught my attention.

In the animation block, one can still use the [UIView setAnimationRepeatCount:]. I thought that I could/should not. So my ability to read Apple doc needs to improve.

So perhaps this would solve your (and my need). I'm trying it later today

As @PommeOuest mentioned. You can still user [UIView setAnimationRepeatCount:] inside the animation block. I just tried in my project and it works well.

I'm using XCode4 and iOS5.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!