次のAPIを使用してスレッドで何らかのアクションを実行したいので、奇妙なセレクタpoiOneBoxSearchが呼び出されていません。なぜですか?コードの間違い?ありがとう。不思議なことに、サブスレッドのIPhone performSelectorが機能しません。
- (void)poiOneBoxSearch{
[self poiOneBoxSearcWithQueryString:@"coffee" isFinished:YES];
}
- (void)test1{
NSThread* thread = [[NSThread alloc] init];
[self performSelector:@selector(poiOneBoxSearch)
onThread:thread
withObject:nil
waitUntilDone:YES];
[thread release];
}
はい、この方法が機能します。 – jianhua
これは、多くの他のオプションがバックグラウンドスレッドから呼び出されたときに機能しました。 –