我想做使用以下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 2012-06-11 09:23:38
當許多其他選項沒有時,從後臺線程調用時,這會起作用。 – 2013-02-20 02:14:21