我用这个 init 方法子类化 CCMenuItemImage
-(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");
}
并且每次在控制台中出现此错误时都会崩溃
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSInvocation invocationWithMethodSignature:]: method signature argument cannot be nil'
提前感谢您的帮助。