开发者

Is it possible to delay setAnimationDidStopSelector?

开发者 https://www.devze.com 2022-12-20 04:24 出处:网络
I have made a UIImageView, added it to th开发者_运维知识库e subview, and plan to animate it.I am using the setAnimationDidStopSelector method and was wondering if I could get it to call a function 3 o

I have made a UIImageView, added it to th开发者_运维知识库e subview, and plan to animate it. I am using the setAnimationDidStopSelector method and was wondering if I could get it to call a function 3 or so seconds after the animation stops.

Here is the current line of code I am using:

    [UIView setAnimationDidStopSelector:@selector(onAnimationComplete:finished:context:)];
[UIView setAnimationDelegate:self];
[UIView commitAnimations];

Thanks.


From your animationDidStopSelector method you can call another method using performSelector:withObject:afterDelay:.

0

精彩评论

暂无评论...
验证码 换一张
取 消