In a UIViewController subclass I create a bar button item that fires an event up the responder chain:
UIBarButtonItem* editListsButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStyleBordered target:nil action:@selector(edit)];
self.navigationItem.leftBarButtonItem = editListsButton;
[editListsButton release];
In an ancestor UIViewController subclass's implementation (i.e. in the .m file) I have the following:
@interface GroupController (PrivateMethods)
- (void) edit;
@end
- (void) edit {
... do something here ...
}
And of course in the corresponding .h file I do not declare the edit method. This was a random mistake on my part.
Should this work reliably anyways? What is the requirement for how to declare the method so that it receives the edit events?
BTW, I have reports that touching the "Edit" bar button item causes the app to crash every time it is touched, but only from a few of many thousands of users. I can't reproduce it.