-[UIApplication delegate] must be called from main thread only

前端 未结 2 432
情话喂你
情话喂你 2020-11-28 11:02

This warning leads to a serious problem cause I really can\'t call the delegate outside of the main thread using Xcode 9 beta 2. Strange thing is that this was working when

2条回答
  •  春和景丽
    2020-11-28 11:45

    In Swift, you could also use DispatchQueue.main.async to call the UI controlling method from the main thread

    DispatchQueue.main.async {
        YourUIControlMethod()
    }
    

提交回复
热议问题