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!

Était-ce utile?

La solution

How about the following NSObject method:

- (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top