MacBgnr
Apr 29 2009, 10:52 AM
Hello,
I am using NSThread to create a worker thread for a long task. However, from the main method of the worker thread, I want to Update some UI elements. How can I do this?
stroke
Apr 30 2009, 02:31 AM
You can send an NSNotification to a controller object registered for that notification, or you can use NSObject's performSelectorOnMainThread:withObject:waitUntilDone: method.
MacBgnr
Apr 30 2009, 02:16 PM
Thanks for the helpful reply.
I have implemented performSelectorOnMainThread:withObject:waitUntilDone. However, it looks like that it works when waitUntilDone is set to YES or when using sleep(1). The selector does not get called if I use waitUntilDone = NO and dont use sleep().
Any ideas how this can be resolved?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.