如何延迟方法调用1秒? [英] How can I delay a method call for 1 second?
本文介绍了如何延迟方法调用1秒?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有一个简单的方法延迟方法调用1秒?
Is there an easy way delay a method call for 1 second?
我有一个 UIImageView
对触摸事件。当检测到触摸时,在应用程序中发生一些动画。一秒钟后,我想调用另一个方法。在这种情况下,我不能使用 animationDidStop
选择器。
I have a UIImageView
that reacts on a touch event. When the touch is detected, some animations happen in the app. After one second, I want to call another method. In this case, I can't use the animationDidStop
selector.
推荐答案
performSelector:withObject:afterDelay:
这篇关于如何延迟方法调用1秒?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文