• 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: progress bar not updating
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: progress bar not updating


  • Subject: Re: progress bar not updating
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 06 Oct 2016 13:46:48 -0500

On Oct 6, 2016, at 1:36 PM, J.E. Schotsman <email@hidden> wrote:
>
>
>> On 06 Oct 2016, at 19:43, Jens Alfke <email@hidden> wrote:
>>
>> That means that KVO is going to call the view’s observeChange method on your background thread, not on the main thread. Which I believe qualifies as “updating the UI from a background thread”, which is illegal. It may be that the view has fail-safe code to check for this and ignores the change. Have you checked the console for warnings?
>
> …
> Are you saying I cannot use bindings in this scenario?

When you are using bindings, you must ensure that changes to the properties to which UI is bound happen only on the main thread.  Depending on your design, you can often do something like:

dispatch_async(dispatch_get_main_queue(), ^{ self.myProperty = newValue; });

Regards,
Ken


_______________________________________________

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: progress bar not updating
      • From: "J.E. Schotsman" <email@hidden>
References: 
 >progress bar not updating (From: "J.E. Schotsman" <email@hidden>)
 >Re: progress bar not updating (From: Jens Alfke <email@hidden>)
 >Re: progress bar not updating (From: "J.E. Schotsman" <email@hidden>)

  • Prev by Date: Re: progress bar not updating
  • Next by Date: Extra logging in Simulators for iOS 10 & for macOS Sierra?
  • Previous by thread: Re: progress bar not updating
  • Next by thread: Re: progress bar not updating
  • Index(es):
    • Date
    • Thread