我想做使用以下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