我不得不打电话来计算MainThread上的一些东西。当计算过程运行时,我可以调用UIProgressView来更新UI。
UIProgressView更新后台线程
当我就叫更新功能,它的工作,但更新最后
UI我使用performSelectorInBackground
调用更新功能,它的做工精细。
为什么要用performSelectorInBackground
可以工作
我已经看到了这What's happen if control UI by performSelectorInBackground?,但它无法解释为什么performSelectorInBackground
工作。
示例代码
https://github.com/g78101/progressViewTest