如何解决iPhone:无法识别的选择器错误
| 我正在处理一些这样的任务: RootViewController- (void)viewDidLoad {
[NSThread detachNewThreadSelector:@selector(findSomething) toTarget:self withObject:nil];
}
- (void) findSomething {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
doMoreThings
[pool release];
}
- (void) doMoreThings {
doMoreMoreMoreThings on different objects
}
- (void) foundSomething:(NSFoundThing*)foundObj {
do your stuff
}
一个对象
- (void) doMoreMoreMoreThings {
do things
[self performSelectorOnMainThread:@selector(foundSomething:) withObject:thingFound waitUntilDone:NO];
}
给
-[KMLParser foundSomething:]: unrecognized selector sent to instance 0x5888080
问题是什么 ?
解决方法
线程无关。您未显示给我们的某些代码正在实现,因此您正在向不处理该消息的对象发送“ 3”选择器。将消息路由到可以处理该消息的对象,您的问题将消失。
另请参见\“无法识别的选择器发送到实例\”。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。