이 방법을 사용하고 객체를 전달할 수 있습니까? 이 코드로,이 오류가 얻을 : 그것은 hideUpdateView 방법을 결코 도달하지iOS performSelector onThread with object
-[myApp hideUpdateView]: unrecognized selector sent to instance 0x8b6a880
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[myApp hideUpdateView]: unrecognized selector sent to instance 0x8b6a880'
을 ...
코드 :
NSArray *array = [NSArray arrayWithObjects:@"1", @"2", nil];
[self performSelector:@selector(hideUpdateView) onThread:[NSThread mainThread] withObject:array waitUntilDone:YES];
- (void) hideUpdateView: (NSArray *) inputArray
{
int catCount = [[inputArray objectAtIndex:0] intValue];
//hide it
}
내가 잠시 동안 아이폰 OS 개발 떨어져있었습니다 (. 콜론은 선택의 이름의 일부입니다. 오브젝티브 C의 turorial을 읽어 보시기 바랍니다)하지만 @selector (hideUpdateView'해야합니다 :) '? – Pete
물론 @Pete해야합니다. –
@ H2CO3 차가움. 그리고 Obj-C의 라인을 2 년 동안 작성하지 않았습니다. 대신 포인트를 얻기 위해 답으로 넣어야했습니다. – Pete