Re: Anything like -[performBlockOnMainThread:]?
Re: Anything like -[performBlockOnMainThread:]?
- Subject: Re: Anything like -[performBlockOnMainThread:]?
- From: Rick Mann <email@hidden>
- Date: Mon, 15 Mar 2010 14:36:54 -0700
Thanks!
On Mar 15, 2010, at 14:35:39, Clark Cox wrote:
> On Mon, Mar 15, 2010 at 2:32 PM, Rick Mann <email@hidden> wrote:
>> Instead of passing my operation a target and selector, is there any way I can just pass it a block, but then have it execute that block on the main thread?
>
> [[NSOperationQueue mainQueue] addOperationWithBlock: ^{
> ...
> }];
>
> or:
>
> dispatch_async(dispatch_get_main_queue(), ^{
> ...
> });
>
>
> --
> Clark S. Cox III
> email@hidden
_______________________________________________
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