→ darktt:可以用[NSThread isMainThread]來確認現在是否在 01/05 08:59
→ darktt:main thread中 01/05 09:00
感謝樓上 的確不在main thread中執行,另外想請問一下假如UIView animation不在
main thread中被呼叫的話是不是會被block?因為我的 UIView animation在
didReceiveDataFromPeer中被呼叫, 但是直到約7秒後才被執行(其他剩下動作都被
執行完畢了)。之後我用dispatch_async(dispatch_get_main_queue(),^(){..code..})
才讓動畫能夠在DidReceiveDataFromPeer被呼叫後及時呈現
※ 編輯: a126040023 來自: 140.114.236.81 (01/07 00:00)
→ uranusjr:UI 更新必須在 main thread, 否則應該是未定義行為 01/07 10:43