gpt4 book ai didi

iphone - [NSThread detachNewThreadSelector :] and -performSelectorInBackground 之间的区别

转载 作者:行者123 更新时间:2023-12-03 18:17:47 24 4
gpt4 key购买 nike

我一直在许多应用程序中使用 -performSelectorInBackground,有点忘记了 -detachNewThreadSelector。现在我想知道两者之间有什么区别。它们是否几乎可以互换,或者是否存在差异以及其中一种优于另一种的地方?谢谢!

最佳答案

它们是相同的。请参阅documentation .

performSelectorInBackground:withObject:调用该方法的效果与以当前对象、选择器和参数对象为参数调用 NSThread 的 detachNewThreadSelector:toTarget:withObject: 方法的效果相同。

关于iphone - [NSThread detachNewThreadSelector :] and -performSelectorInBackground 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2092526/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com