• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Invoking protocol method on the main thread
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Invoking protocol method on the main thread (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Safe to install NSTrackingArea on a subview?
  • Next by Date: Storyboard UISplitViewController difficulty
  • Previous by thread: Re: Invoking protocol method on the main thread
  • Next by thread: Static table view cells inconsistently update
  • Index(es):
    • Date
    • Thread