• 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: Difference between NSOperationQueue and NSThread in iOS4?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Difference between NSOperationQueue and NSThread in iOS4?


  • Subject: Re: Difference between NSOperationQueue and NSThread in iOS4?
  • From: Michael Ash <email@hidden>
  • Date: Wed, 25 Aug 2010 10:22:47 -0400

On Tue, Aug 24, 2010 at 2:42 PM, Scott Andrew
<email@hidden> wrote:
> I have a question that I have been researching but can't find an answer for.
>
> I have some iOS 3.2 code using NSOperation this doesn't work using NSOperation but works using NSThread withe detatch thread in iOS4 with the desired effect. My code is basically to create and generate pages for my paged scrollview in the background. Its basically a play on the WWDC picture scroller demo. I however have some almost full screen views we prepare in the background. The code look like:
[snip]

UI operations are not generally thread safe. While I couldn't find
anything specific to UIKit in a quick search on Apple's site (the
thread safety guide in the iPhone section still talks about NSWindow
and such, doh!), if it's anything like AppKit, there is very little
manipulation of views that you can safely do from secondary threads.
That it's working with NSThread is pure luck. You need to refactor
your code so that all view manipulation happens on the main thread.

Mike
_______________________________________________

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

  • Follow-Ups:
    • Re: Difference between NSOperationQueue and NSThread in iOS4?
      • From: Scott Andrew <email@hidden>
References: 
 >Difference between NSOperationQueue and NSThread in iOS4? (From: Scott Andrew <email@hidden>)

  • Prev by Date: Re: Crashes in _Unwind_Resume
  • Next by Date: Question about UITableView
  • Previous by thread: Difference between NSOperationQueue and NSThread in iOS4?
  • Next by thread: Re: Difference between NSOperationQueue and NSThread in iOS4?
  • Index(es):
    • Date
    • Thread