Warning: UIKit should not be called from a secondary thread

前端 未结 5 1521
悲哀的现实
悲哀的现实 2020-12-10 00:44

In my iPhone app I need to connect to a web server as this can take some time I\'m using threads like this:

[NSThread detachNewThreadSelector:@selector(sendS         


        
5条回答
  •  生来不讨喜
    2020-12-10 01:12

    Perform any selectors that handle UI updates on the main thread. You can do this with the NSObject method -performSelectorOnMainThread:withObject:waitUntilDone:

提交回复
热议问题