原文:Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState]

最近的一個項目中使用到MBProgressHUD.在x以下的機型中沒有問題.但是只要在x系列機型中運行就會出現Main Thread Checker: UI API called on a background thread: UIApplication applicationState 線程警告.並且MBProgressHUD的彈出會有很大延遲.網上查了一下是因為系統幫你開啟了線程檢測導致這個問 ...

2019-07-06 15:36 0 2430 推薦指數:

查看詳情

iOS Main Thread Checker: UI API called on a background thread的解釋

Xcode打印欄出現如下警告: Main Thread Checker: UI API called on a background thread 這個是什么錯誤呢? 其實這並不一定是錯誤,也可以理解為一種警告,說他不是錯誤,是因為它不一定會影響你的代碼功能,可能對你的實現功能 ...

Wed Nov 08 00:03:00 CST 2017 1 20129
關於Xcode Main Thread Checker: UI API called on a background

今天寫了一個實時更新相關數據的App,但是build出來發現,show 下面的warning: 很奇怪,不太懂這個邏輯,什么是 UI API 呼叫背景thread? 查詢一番得知,引用大大的解釋: 所以,問題的原因出在UI的處理沒有強制到main thread去執行。 解決方式 ...

Thu Mar 19 21:39:00 CST 2020 0 943
Android 判斷當前thread 是否是UI thread

在Android 中判斷當前的Thread是否是UI Thread 的方法:   1. 2. 參考如下文章:其中還講到了 runOnUiThread() 方法的用法。 http://codetheory.in ...

Wed Oct 05 17:02:00 CST 2016 0 3547
std::thread “terminate called without an active exception”

最近在使用std::thread的時候,遇到這樣一個問題: 如果不使用調用t.join()就會遇到 "terminate called whithout an active exception",但是在使用boost:thread的時候卻沒遇到這個問題,google了一下,找到答案 ...

Wed Sep 11 02:24:00 CST 2013 0 11867
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM