Im subclassing CCMenuItemImage with this init method
-(id)initWithChildren:(id)targetedApplication {
if(self = [super initFromNormalImage:@"Answer_Box.png" selectedImage:@"Answer_Box.png" disabledImage:@"Answer_Box.png" target:targetedApplication selector:@selector(answerButtonTapped:)] ) {
NSLog(@"Yes?");
return self;
}
return self;
}
-(void)answerButtonTapped:(id)stuff {
NSLog(@"Answer Button Tapped");
}
and it crashes every time with this error in the console
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSInvocation invocationWithMethodSignature:]: method signature argument cannot be nil'
Thanks in advance for any help.
is -answerButtonTapped a method of targetedApplication? It should be that one. The error says that there is no such a function in target. Or you can pass “self” instead of “targetApplication”