Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
NSThread のドキュメントで、メソッドに出くわしましたdetachNewThreadSelector:toTarget:withObject:。initWithTarget:selector:object:その方法と、でスレッドを作成してから開始することの違いは何startですか?
detachNewThreadSelector:toTarget:withObject:
initWithTarget:selector:object:
start
唯一の違いは、2番目の方法ではNSThreadオブジェクトへの参照が提供されるため、開始する前にスタックサイズや優先度を設定したり、isExecuting / Finished/Cancelledメソッドを使用して後でそのステータスを確認したりできることです。