In my iPhone application I have such code:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
self.title = @"Instruction Controller";
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(menuButtonClicked)];
}
#pragma mark private methodes
-(void) menuButtonClicked{
NSLog(@"menuButtonClicked");
}
But when I click on this button it raise an exeption: "Unrecognized selector sent to instance". How cam I resolve this issue?
UPDATE
2013-05-23 12:21:33.182 CICDP[3091:11603] -[__NSCFString menuButtonClicked]: unrecognized selector sent to instance 0x8128eb0 2013-05-23 12:21:33.188 CICDP[3091:11603] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString menuButtonClicked]: unrecognized selector sent to instance 0x8128eb0'