|Dec 27, 2012, 07:38 PM||#1|
Changing the style of a bar button item
Let's say that I have a navigation controller and I push a view controller.By doing this, a button that leads me back to the previous controller is created.
I've found the navigation item holding the button this way:
But the only button is backItem.rightBarButtonItem, even if the button is displayed at the left, the other two buttons (back and right) are nil.
If I try changing the button item this way:
|Jan 3, 2013, 02:03 AM||#2|
Try something like this:
UIBarButtonItem *previous = [[UIBarButtonItem alloc] initWithTitle:@"Search" style:UIBarButtonItemStyleBordered target:self action:@selector(SearchAction:)];
Greetings from the Arctic Circle
|Jan 3, 2013, 04:40 PM||#3|
Is there a Reason setting.
yourViewController.navigationItem.backButtonItem = someButton;
wouldn't work for you?
If you do that to your viewControllers when you set them up, when you push the viewController on to the navigation controller the buttons will be those set for the visible viewController. You don't have to worry about reseting each time that view will appear.
There is no such thing as "Collective Wisdom"
[ iPhone 5s, iPad Mini, 13" MacBookPro 2.7Ghz, 27"Al iMac i7, Black MacBook 13"]
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Mysterious menu bar item ghost app?||Jantelagen||OS X Mavericks (10.9)||3||Feb 24, 2014 06:41 AM|
|Menu bar item still appears after uninstallation of App||Divegent||OS X Mavericks (10.9)||2||Dec 18, 2013 09:52 AM|
|Changing Media Type does not move item to podcast section||cgm707||iPod touch||0||Apr 30, 2013 10:39 AM|
|MacBook Air Menu Bar Missing Item||scruffy75||Mac OS X 10.7 Lion||0||Mar 12, 2013 03:36 PM|
|Why this way to set the tab bar item badge doesn't work?||pan17||iPhone/iPad Programming||10||Jul 22, 2012 10:06 PM|
All times are GMT -5. The time now is 03:41 PM.