30
Objective-C中的“无法识别的选择器发送到实例”错误
我创建了一个按钮并为其添加了一个动作,但是一旦调用它,我就会收到此错误: -[NSCFDictionary numberButtonClick:]: unrecognized selector sent to instance 0x3d03ac0 2010-03-16 22:23:58.811 Money[8056:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:'*** -[NSCFDictionary numberButtonClick:]: unrecognized selector sent to instance 0x3d03ac0' 这是我的代码: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { UIButton *numberButton = [UIButton buttonWithType:UIButtonTypeCustom]; numberButton.frame = …