I use NSThread to implement a timer through every second label to display, and then I also passed NSLog print, why do I see NSLog print out the number of constantly updated every second, why label does not update it, but clicking thread stops when, label is updated to display the current figures
Reply:
Is not your view does not refresh it? ? You can update the look every second label,
Give you a reference:
http://www.cocoachina.com/bbs/read.php?tid=9069
http://blog.sina.com.cn/s/blog_4aacd7af01018gmp.html
Reply:
This method is not the place you want to execute the main thread
Reply:
Recommend that you use beginBackgroundTaskWithExpirationHandler UIApplication singleton: ^ {} method combines NSTimer
Reply:
If you want to refresh the contents label on the inside of the thread, then you label each time to set up a new content, use performSelectorOnMainThread methods, there is a thread-safety issues.
No comments:
Post a Comment