更新时间:2022-12-09 10:52:13
我猜测self.weatherResult.text = wCont[0]
正在修改类似UILabel
或类似内容的内容,在这种情况下,您尝试更改用户界面的一部分来自后台线程–大禁忌.
I'm guessing that self.weatherResult.text = wCont[0]
is modifying something like a UILabel
or similar, in which case you're trying to change part of your user interface from a background thread – a big no-no.
尝试这样的代码:
dispatch_async(dispatch_get_main_queue()) { [unowned self] in
self.weatherResult.text = wCont[0]
}