views:

312

answers:

3

Hi

I have a tabController-based iPhone application. First tab is associated with a table view controller. When I select a table cell I want to show another table controller view, but with different tabs on the bottom. What is the best way to do it? Change dynamically tab entries, or do it through IB? Please advise.

Thanks,

Nava

A: 

The Apple Human Interface Guidelines really advise against this.

For example, on iPhone, iPod uses a tab bar to allow users to choose which part of their media collection to focus on, such as Podcasts, artists, videos, or playlists. The Clock application, on the other hand, uses a tab bar to give users access to the four functions of the application, namely, World Clock, Alarm, Stopwatch, and Timer. Figure 6-10 shows how selecting a tab in a tab bar changes the view in Clock. Notice how the tab bar remains visible in the different Clock modes shown in Figure 6-10. This makes it easy for users to see which mode they’re in, and allows them to access all Clock modes regardless of the current mode.

What you're thinking of doing might be possible with toolbars.

Dan Lorenc
A: 

Check this link for an explanation on how to do this.

http://www.wiredbob.com/blog/2009/4/20/iphone-tweetie-style-navigation-framework.html

Jonah
Thank you for posting this link. In my case logically it would fit to tab bar, since i need to toggle between another set of views. Is there a way to add/remove or show/hide tabs?
Nava Carmon
Here's a link to some sample code I adapted from another site.http://files.me.com/jonahwy/9iz2ng
Jonah
Thank you Jonah! Seems exactly what i need!
Nava Carmon
A: 

BTW, I found the best and the cleanest way to do that thanks to Rufus - iPhone Beta Dev Forum contributor: you can change the views of root tabbarcontroller anytime you want, also you can change tabbaritems title & icons. So actually I don't need 2 tabbarcontrollers, instead i change the existing one, setting its views & tabbaritems of views accordingly.

Nava Carmon