0
이 같은 일부 작업을 threeaing 해요 :아이폰 : 인식 할 수없는 선택 오류
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
}
oneObject
- (void) doMoreMoreMoreThings {
do things
[self performSelectorOnMainThread:@selector(foundSomething:) withObject:thingFound waitUntilDone:NO];
}
이 -[KMLParser foundSomething:]: unrecognized selector sent to instance 0x5888080
-[KMLParser foundSomething:]: unrecognized selector sent to instance 0x5888080
문제는 무엇인가
을 준다?
개체가 내 선택기가 표시된 코드로 전송됩니까? – Oliver
** oneObject ** 섹션에서 'self'인 객체가 있습니다. –
스레딩에 대해 좀 더 읽을 것이지만, 단지 질문 : oneObject 클래스에 foundSomething 메서드가 있다면 어떻게 될까요? 스레드의 관점에서 어떤 일이 일어날 것인가 : 나는 그것으로 실행되는 무엇인가를 가진 주요 thjread를 이미 가지고있다 ... – Oliver