Reputation: 208
I am running:
[self performSelector:@selector(checkTheUsersText) withObject:nil afterDelay:0.01];
and as you can see it runs every 0.01 second! Is there a way to cancel that after it is finished. For example if the user dismisses the keyboard stop running (checkTheUsersText)? Thanks!
Upvotes: 0
Views: 235
Reputation: 955
Even if it gets called only once, you can again cancel the request using
[NSObject cancelPreviousPerformRequestsWithTarget:self
selector:@selector(checkTheUsersText)
object:nil];
For more details please refer this
Upvotes: 2