I am new to iPhone developer,
I want to add one more button next to the Back button on my navigation bar, i am using navigation controller so back button is already there on left side. and on extreme right side i have added one button using
self.navigationItem.rightBarButtonItem = ModeButton;
but when i write,
self.navigationItem.leftBarButtonItem = NewButton;
NewButton overrides my back button, i want to place my new button next to back button.
Any help will be appreciated.
UINavigationItemhas a propertyleftItemsSupplementBackButton, you can use it.leftItemsSupplementBackButton
A Boolean value indicating whether the left items are displayed in addition to the back button.
Discussion
Normally, the presence of custom left bar button items causes the back button to be removed in favor of the custom items. Setting this property to YES causes the items in the leftBarButtonItems or leftBarButtonItem property to be displayed to the right of the back button—that is, they are displayed in addition to, and not instead of, the back button. When set to NO, the items in those properties are displayed instead of the back button. The default value of this property is NO.
From UINavigationController Class Reference.