I'm adding a UIBarButtonItem
programatically, however the damned thing won't add itself to the navigation bar (which was added in IB). Here's the code I'm using to add it:
UIBarButtonItem *shareButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(share)];
self.navigationItem.rightBarButtonItem = shareButton;
in my viewDidLoad
. Since I'm doing that programatically, does that mean that the nav bar has to be done programatically as well? I can't think of any other reason as to why it won't add itself.