Re: Invoking protocol method on the main thread
Re: Invoking protocol method on the main thread
- Subject: Re: Invoking protocol method on the main thread
- From: Seth Willits <email@hidden>
- Date: Thu, 15 Nov 2012 18:53:48 -0800
On Nov 15, 2012, at 3:17 PM, Graham Cox wrote:
> How can I invoke a method of my protocol on the main thread?
Aside from Greg's simple suggestion, GCD is your friend. Then you're not beholden to a single method call, or the interface requirements of the performSelector methods.
dispatch_async(dispatch_get_main_queue(), ^{ anything; });
--
Seth Willits
_______________________________________________
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