iOS Multithreading - NSURLSession and UI updates
问题 I have a general question about multithreading in iOS: In my very simple test app, I use NSURLSession to download some small images from the server and present them in a table view. Within the callback of the NSURLSession, after retrieving the images, I call tableview.reloadData() like so: var session = NSURLSession.sharedSession().dataTaskWithURL(NSURL(url)) {(data, response, error) -> Void in /* Process images here */ self.tableView.reloadData() } session.resume() The images download almost