Question

For several reasons, I would like to make my application backwards compatible to OS X 10.5.

Until now, I am using lots of GCD dispatch queues added in 10.6 like so:

dispatch_async(dispatch_get_main_queue(), ^{
    [self setStatusText:@"Connection established, waiting for response ..."
               withType:STATUS_MSG_INFO];

});

What would be the easiest alternative so that I don't have to re-write all the code?

Suggestions welcome! Thanks in advance!

Was it helpful?

Solution

How about the following NSObject method:

- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top