I often want to execute code in a few microseconds in the future. Now I solve it like this:
- (void)someMethod {
And this:
[self performSelector:@selector(someMethod) withObject:nil afterDelay:0.1];
This works, but I have to create a new method every time. Can blocks be used instead? I'm basically looking for a way like:
[self performBlock:^{ // some code } afterDelay:0.1]
That would be very helpful for me.
ios objective-c iphone cocoa-touch objective-c-blocks
Rits 24 Oct '10 at 3:20 2010-10-24 03:20
source share