[NSTimer scheduledTimerWithTimeInterval:0.0 target:self selector:@selector(doIt:) userInfo:nil repeats:YES];
A shorter and slightly easier method is a selector on NSObject (now that's a base class with a lot of methods if ever I've seen one!)
[self performSelector:@selector(doit) withObject:nil afterDelay:1.0];
If you set afterDelay to be 0.0, you have a quick and easy way of making a selector run once the current run loop has completed.
No comments:
Post a Comment