Re: Anything like -[performBlockOnMainThread:]?
Re: Anything like -[performBlockOnMainThread:]?
- Subject: Re: Anything like -[performBlockOnMainThread:]?
- From: Keith Duncan <email@hidden>
- Date: Mon, 15 Mar 2010 22:01:03 +0000
On 15 Mar 2010, at 21:47, Rick Mann wrote:
> Then again, what I was doing before was really:
>
> [mTarget performSelectorOnMainThread: mSelector withObejct: data waitUntilDone: true];
In which case:
NSBlockOperation *blockOperation = [NSBlockOperation blockOperationWithBlock:^ {
...
}];
[[NSOperationQueue mainQueue] addOperation:blockOperation];
[blockOperation waitUntilFinished];
or
dispatch_sync(dispatch_get_main_queue(), ^ {
...
});
Keith
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden