iPhone如何取消停止performSelector [英] iPhone how to cancel stop performSelector

查看:115
本文介绍了iPhone如何取消停止performSelector的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的iPhone应用程序中,我使用以下功能在延迟一段时间后执行某些操作

In my iPhone app, i'm using the following function to do something after some delay

- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay;

有没有办法取消这个performSelector并在延迟后停止做某事?

Is there any way to cancel this performSelector and stop doing some thing after the delay?

推荐答案

[NSObject cancelPreviousPerformRequestsWithTarget:yourTarget selector:aSelector object: anArgument];

这篇关于iPhone如何取消停止performSelector的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆