0
votes

I've 4 views that I need to show in 3 tabs in a UITab bar

The situation is, in a Navigation-based iPhone app, I've a button that the user clicks that take him to a view (view1) with 3 tabs at the button, each tab he clicks will take him to a new view..

So, I've view1, view2, view3 and view4 and tab1, tab2 and tab3

in view1,

  • tab1 navigate to view2
  • tab2 navigate to view3
  • tab3 navigate to view4

in view2,

  • tab1 navigate to view1
  • tab2 navigate to view3
  • tab3 navigate to view4

and so on..

I've tried to do it programmatically by creating tab controller under the initial button the use press.. (besides it is not easy to implement, for me at least)

Also, I've tried to use Interface Builder to drag a UITabBar in each view (so I'll have 4 UITabBar in the 4 views) and customize the action of each tabBarItem upon the schema above..

I think the second solution is bad (creating 4 UITabBars!)..

So, what's the best practice here .. and kindly refer me to reference as It is the first time for me to work with TabBars

Thanks.

2
Basically, you have the program running and you would like to know the best practice ?Or Ron
Why ask? I am still in dev stage.Muhammad Hewedy

2 Answers

0
votes

Just make custom TabBar with dynamic ViewController array just change array as per your requirement...

0
votes

This sounds like an interesting design to try. If I understand correctly, you'd basically like to remove the tab for the current view from the bar, to make the 'other' tab buttons bigger?

I'm not sure you're going to be able to do this with UITabBarController. I'm working on my own implementation of UITabBarController, I may try this out.