我一直假设所有 collectionView/tableView 委托(delegate)/数据源方法都在主队列中执行,只是想验证一下。
最佳答案
任何框架提供的与 UI 相关的东西都在主线程中执行并验证 do
print(Thread.isMainThread)
在任何这些协议(protocol)方法中,你也可以打印
print(Thread.main)
print(Thread.current)
如果匹配则为主线程,否则为另一个线程
关于ios - 在哪些队列中执行 Collection View 的委托(delegate)/数据源方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52958894/