我使用NSInvocation的如下:NSInvocation的製作程序崩潰
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];
我打電話像這樣:
在我的初始化,我在我的viewDidLoad中寫這個
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 2010-06-15 03:52:24