[英]Does makeObjectsPerformSelector: always happen on the main thread?
我使用makeObjectsPerformSelector:
編寫了一行代碼makeObjectsPerformSelector:
[view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]
在我的項目中。 這是否總是在主線程上發生?
不必要。 除非其文檔另有說明,否則方法將在調用它們的線程上運行。 比較performSelectorOnMainThread:withObject:waitUntilDone:
和performSelector:onThread:withObject:waitUntilDone:modes:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.