objective c - Pressing UIButton results in Unrecognized Selector error -
I have a button in my And this is the action method: But I get this error 2011-09-02 15: 27: 13.362 blubb [15006: 207] - [DatabaseSelectionViewController toggleEdit]: Unfolded selector sent for example 0x5a29d80 2011-09 -02 15: 27: 13.365 blubb [15006: 207] * Unexpected exception 'NSInvalidArgumentException', the application ended due to reason: '- [DatabaseSelectionViewController toggleEdit]: Unrecognized selector example 0x5a29d80 Sent to ' Why is this happening? change to UIView that is created like this:
UIBarButtonItem * editButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemEdit Goal: auto operation: @selector (toggleEdit)]; Self.navigationItem.rightBarButtonItem = editButton; [Edit Button Release];
- (zero) toggleEdit: (id) this {}
@selector (toggleEdit) < / Pre>
@selector (toggleEdit :)
Comments
Post a Comment