Wednesday, October 3, 2012

Add buttons on navigation bar


You need to add UIBarButtonItem instance to a UINavigationItem, not to a UINavigationBar. So you can do this as:
NSArray *buttonArray = [NSArray arrayWithObjects:logoButton, logoButton2, logoButton3, nil];
self.navigationItem.leftBarButtonItems = buttonArray;
If you want your buttons on the right, use rightBarButtonItems.


No comments:

Post a Comment