makeObjectsPerformSelector: 总是发生在主线程上吗?
Does makeObjectsPerformSelector: always happen on the main thread?
我有一行代码使用makeObjectsPerformSelector:
[view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]
在我的项目中。这是否总是发生在主线程上?
不一定。方法将 运行 在调用它们的线程上 除非它们的文档另有说明。比较 performSelectorOnMainThread:withObject:waitUntilDone:
and performSelector:onThread:withObject:waitUntilDone:modes:
我有一行代码使用makeObjectsPerformSelector:
[view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]
在我的项目中。这是否总是发生在主线程上?
不一定。方法将 运行 在调用它们的线程上 除非它们的文档另有说明。比较 performSelectorOnMainThread:withObject:waitUntilDone:
and performSelector:onThread:withObject:waitUntilDone:modes: