makeObjectsPerformSelector:总是发生在主线程上吗?

时间:2017-08-14 06:51:33

标签: ios multithreading cocoa-touch nsarray

我使用makeObjectsPerformSelector:

编写了一行代码
[view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]

在我的项目中。这总是发生在主线程上吗?

1 个答案:

答案 0 :(得分:0)

不一定。除非文档另有说明,否则方法将在调用它们的线程上运行 。比较performSelectorOnMainThread:withObject:waitUntilDone:performSelector:onThread:withObject:waitUntilDone:modes: