I am not sure why the following code is not working:
UIBarButtonItem *newButton = [[UIBarButtonItem alloc] initWithTitle:@"New" style:UIBarButtonItemStyleBordered target:self action:@selector(newClicked:)];
UIBarButtonItem *shareButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(share:)];
self.navigationItem.rightBarButtonItems = [NSArray arrayWithObjects:newButton, shareButton, nil];
It only display the “newButton” UIBarButtonItem on the navigation bar and not the “shareButton” button.
Looks like the problem had to do with code following the questioned code:
Posting this now in case someone else encounters this problem!