Pressing UIBarButtonItem on a NavigationController
Posted
by john
on Stack Overflow
See other posts from Stack Overflow
or by john
Published on 2010-06-15T14:36:51Z
Indexed on
2010/06/15
14:42 UTC
Read the original article
Hit count: 301
Hey
I've added a button the my navigation bar like so:
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Edit" style:UIBarButtonItemStylePlain target:self action:@selector(methodtocall:)];
self.navigationItem.rightBarButtonItem = anotherButton;
[anotherButton release];
However when I press this I get a InvalidArgumentException. This is in a brand new navigation project. Does anyone know why I get this behaviour?
© Stack Overflow or respective owner