为什么这不起作用?
dispatch_group_notify(group, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) { () -> Void in
println("Howdy, I get called")
self.myLabel.text = "Hello Mr. Gordon Freeman"
}
打印邮件但未设置UILabel文本。
答案 0 :(得分:1)
您只能更新主队列中的UI元素:
dispatch_group_notify(group, dispatch_get_main_queue()) {
println("Howdy, I get called")
self.myLabel.text = "Hello Mr. Gordon Freeman"
}