Ios5 storyboard add right button to nav bar?

Based on my own experience, you typically use this sequence.

Up vote 0 down vote favorite share g+ share fb share tw.

So I started to experiment with storyboard. So my storyboard is as follow nav controller -> tableviewcontroller -> tabBarController -> tableViewController as an item of the tab bar (buy linking them through relationship segue) The last tableviewcontroller does appear with a navbar on top but I can't add any bar button item on it. Even the code self.navigationItem.

RightBarButtonItem = self. EditButtonItem does not make it appear. The thing is with the first tableviewcontroller it does work (code and designer works).

I suspect it had to do something with the first nav controller. I did try embedded in the nav controller in the tableviewcontroller but that just shoes 2 navbar. Any help is appreciated Thanks, EDIT: Add storyboard screenshot ios5 uistoryboard link|improve this question edited Mar 7 at 2:51 asked Mar 5 at 4:21pdiddy1,978520 89% accept rate.

Based on my own experience, you typically use this sequence: tabBarController -> navController -> tableViewController In other words, a tab bar controller with a tab bar item containing a navigation controller, which in turn holds a table. If this isn't the solution you're looking for or the button doesn't show up, could you include a snapshot of your storyboard? UPDATED: If you are attempting to make your tab bar dynamic, you need to change the array that tabBarController.

ViewControllers is using. As mentioned in the comments, this isn't the best approach if you are following the interface guidelines but here's how I got it to work: //Initial tab bar items self. TabBarController.

ViewControllers = NSMutableArray arrayWithObjects:originalItem1, originalItem2, nil; //Now let's replace the old items with some new ones! Self. TabBarController.

ViewControllers = NSMutableArray arrayWithObjects: replacementItem1, replacementItem2, replacementItem3, nil; As you can see, we initially set the tab bar to contain two tab bar items (originalItem1 & 2). Then the next bit of code replaces those items with some new ones (replacementItem1 & 2 & 3). Since it appears you are trying to change the tab based on the view the app is currently in, you would probably want to include this in the viewWillLoad method.

This means that the tab bar should update as the view is about to be loaded. Of course, you would need to set some conditions in nearly every view so that the tab bar would constantly be changing to the one you want. Unfortunately, this is more of a programmatic approach and you are using storyboard.

I don't see an obvious way of getting this done in the storyboard alone, but the code should be able to help.

I need to start with a Table List without. So that is why I don't start the storyboard with a Tab. Its only when the user click on a item on the list, that it will show the detail which is my tabbarcontroller with 2 tab items .... I will get a screen capture of the storyboard – pdiddy Mar 7 at 2:44 Ok, I think see what you mean.

I take it you want to have a dynamic tab bar? Looking into it now. While you wait, you may want to read this.

It appears that the iOS HIG suggest avoiding this. – Squatch Mar 7 at 3:13 It's not really dynamic tab bar. The view containing the TabBar has 2 tabitems.

Each items are tableviewcontroller. I wanted to add a button on the nav bar for the first tab, but can't make it work. Thanks for try to find a solution.

– pdiddy Mar 7 at 3:27 Thanks for the HIG .... so would this be a bad UI ..? It seems alright to me .. upon click on the item you can see a details which is seperated in 2 tabs .... – pdiddy Mar 7 at 3:30 I can see how it makes sense, but this could quickly get out of control if you have more than a few tab bars. Tab bars provide an easy way of letting the user know where they are in the app. While navigation controllers do this to an extent, tab bars do it better.

Remember apps are used for very brief periods of time and shouldn't be too complicated (KISS- Keep It Simple and Stupid). Either way, I didn't leave you hanging! Updated the answer above.

– Squatch Mar 7 at 3:42.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions