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.
別のスレッドでクラスメソッド(「+」で始まる)を実行することは可能ですか?通常、私は成功せず[myClass myController];に試したようにメソッドを呼び出します。[NSThread detachNewThreadSelector:myController toTarget:myClass withObject:nil];
[myClass myController];
[NSThread detachNewThreadSelector:myController toTarget:myClass withObject:nil];
[myClass class]はい、代わりにターゲットを作成する必要がありますmyClass。@selector()また、セレクター名の周りを使用するのを忘れました。あなたが望んでいるのは:
[myClass class]
myClass
@selector()
[NSThread detachNewThreadSelector:@selector(myController) toTarget:[myClass class] withObject:nil];