Я использую NSInvocation следующим образом:NSInvocation делает приложение аварии
В моей инициализации, я пишу это в моем viewDidLoad:
SEL mySelector;
mySelector = @selector(initParsersetId:type:);
NSMethodSignature * sig = nil;
sig = [[self class] instanceMethodSignatureForSelector:mySelector];
myInvocation = nil;
myInvocation = [NSInvocation invocationWithMethodSignature:sig];
[myInvocation setTarget:self];
[myInvocation setSelector:mySelector];
И я звоню это так:
Idea *tempIdea = [[Idea alloc]init];
tempIdea = [genericArray objectAtIndex:indexPath.row];
idea.ideaId = tempIdea.ideaId;
[tempIdea release];
NSNumber *_id_ = [NSNumber numberWithInt:idea.ideaId];
[myInvocation setArgument:_id_ atIndex:2]; //CRASHING AT THIS LINE
Мое приложение разбивается по указанной линии. Может ли кто-нибудь помочь мне?
Thanx David .. Это помогло .. – neha