Hi, This doesn’t work probably because the Class is that is calling back the delegate method that updates the Scroll View is also being run on the main thread. Sorry I should have said this earlier. I tried updating the UI on a background thread and it seemed to work BUT I got warning message from CALayer or maybe CATransaction and I think it caused the App to hang.
The time consuming method I am calling is in a third party library and it must be called in the main thread. All the Best Dave > On 21 Sep 2016, at 17:01, Sandor Szatmari <admin.szatmari....@gmail.com> > wrote: > > In general, one simple form is: > > dispatch_async( dispatch_get_main_queue(), ^{ > // do UI updates on the main thread. > }); > > This can also be done with NSOperationQueue: > > [[NSOperationQueue mainQueue] addOperationWithBlock:^{ > // do UI updates on main thread. > }]; > > Sandor Szatmari > > On Sep 21, 2016, at 11:40, Dave <d...@looktowindward.com > <mailto:d...@looktowindward.com>> wrote: > >> Hi All, >> >> How can I update my UI from a background thread? >> >> I have a method that does a LOT of intense processing, it calls a delegate >> method in my Window Controller which appends it to a Logging Scroll View, >> however nothing shows up in the Scroll View although it NSLog’s the string >> ok. >> >> Firstly is it ok to do this? When I tried it I got a CALayer error reported >> in the NSLog output. >> >> All the Best >> Dave >> >> >> _______________________________________________ >> >> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com >> <mailto:Cocoa-dev@lists.apple.com>) >> >> Please do not post admin requests or moderator comments to the list. >> Contact the moderators at cocoa-dev-admins(at)lists.apple.com >> <http://lists.apple.com/> >> >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/cocoa-dev/admin.szatmari.net%40gmail.com >> >> <https://lists.apple.com/mailman/options/cocoa-dev/admin.szatmari.net%40gmail.com> >> >> This email sent to admin.szatmari....@gmail.com >> <mailto:admin.szatmari....@gmail.com> _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com