For some reason I want a block to execute during the next iteration of the run loop, so I came up with:
typedef void (^resizer_t)() ;
- (void) applyResizer:
I want a block to execute during the next iteration of the run loop
Well, that's why you've got dispatch_after
. If you supply a tiny time value, it will have exactly the effect you're after: you give a block, and the block will execute as soon the current runloop finishes and the redraw moment has happened.
Or if you can live without insisting on a block, use performSelector:withObject:afterDelay:
with a tiny delay value (even zero). That has the same effect.
What you're asking for is called "delayed performance" and is very common. So do it the common way, the way the framework gives you; don't try to get all weird and fancy like your code is doing.