I have a Tabbed Application which has six tabs, so as expected two of the tabs move under the “More” tab at the end. I have a refresh button I want to put in the top left corner of every tab view, but when I place these using the Storyboard, the back button with the “More” text is overwritten if I’m in one of the tabs that was moved under the More tab. The behaviour I’m trying to get is to put the refresh button NEXT to the More tab, kind of like how Apple did their tabs in the iTunes app in the attached screenshot.
I’ve tried looking at methods that do button placement using code but most of them seem to assume you want to create all the buttons using code and place them in an array. I haven’t been able to find a way to create the More button, since I think that’s generated automatically, but if there’s a method I could use to add an extra button alongside it, that would do what I’m wanting.
tl;dr: Is there a way to add buttons alongside the More button?
(I’m new so I can’t add screenshots, but here is a link to the screenshot I meant. https://i.stack.imgur.com/GV6M2.png)
Found the answer! It always helps to look at the list of methods. There’s a BOOL you can set called leftItemsSupplementBackButton and it is normally set to NO, but if it’s set to YES it will add any buttons next to the back button instead of replacing it. Even works with Storyboard-created buttons 😀
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UINavigationItem_Class/Reference/UINavigationItem.html%23//apple_ref/occ/instp/UINavigationItem/leftItemsSupplementBackButton
}