My current application uses the storyboard interface builder, and I have reached my limit on adding bar button items to the navigation bar. I currently have a right bar button item and a left bar button item, but I need to add a third button to segue to a new view controller. Since dragging the new bar button item wouldn't work in the storyboard, I created the button programmatically within the view controller and used arrayByAddingObject to incorporate the current right bar item and the new right bar item. I would really like to keep the UI within the storyboard if at all possible.
My first question here is is there a way to view the button I created programmatically within storyboard? If not, is there a simple solution to adding more than two bar button items within storyboard? Below is the my current code for the new bar button item.
One last thing: If I choose to go with programmatic approach, how could I segue to a view controller I created in storyboard in the action method.
Button Initializedself.categoryButtonItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cat", @"categories button") style:UIBarButtonItemStyleDone target:self action:@selector(categoryButtonDidPress:)];
self.navigationItem.rightBarButtonItems = [self.navigationItem.rightBarButtonItems arrayByAddingObject:self.categoryButtonItem];
Action Method
-(void) categoryButtonDidPress:(UIBarButtonItem *)sender {
}