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?
2 replies to this topic
#1
Posted 29 April 2009 - 10:52 AM
#2
Posted 30 April 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.
#3
Posted 30 April 2009 - 02:16 PM
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?
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users



Sign In
Create Account







