Closed itisbugra closed 9 years ago
UI code can only run in one thread (the main thread). It's unsafe perform any UI operation on a background thread, which NSURLSession callbacks default to. So you'll need to move the code that interacts with the UI to the main thread:
dispatch_async(dispatch_get_main_queue()) {
tableView.reloadData()
}
@Instigater What @jeffh said.
Thank you Jeff ❤️
I need to reload a NSTableView in the end of some asynchronous request made by Just, however it ends up with the error:
Having found this http://stackoverflow.com/questions/28302019/getting-a-this-application-is-modifying-the-autolayout-engine-error afterwards, however I couldn't solve it as I lack of knowledge about GCD.
As the auto-created log says, it doesn't raise exception (though I wrote it as it does). It enters an infinite loop.