Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-05-2009, 11:07 AM   #1 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 17
siasl is on a distinguished road
Default Multiple UITabBar in an application

Is it possible to have multiple TabBars in an application (of course only one visible at a time).

I have the following requirement. The top level for my application may be broken into categories A, B, C and D. I plan to implement the same using a UITabBarController with A, B, C and D as UITabBarItems.

The category A may have further sub categories of E, F, G, H.

When the user clicks on A, I would like to replace the existing TabBar with a new TabBar (a new TabBarController with TabBarItems for E, F, G, H) and a link back to the original view (displaying old TabBar and A, B, C and D as items).

Is it possible to attempt such a thing in iPhone SDK?

How should one design multiple level categorization of data in iPhone?
siasl is offline   Reply With Quote
Old 01-05-2009, 04:56 PM   #2 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

I believe you can have the first set of abcd be buttons and then they can load different XiB files where you can set up the different tab bars
Bertrand21 is offline   Reply With Quote
Old 01-05-2009, 10:12 PM   #3 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 17
siasl is on a distinguished road
Default

When I click on A button, by default it will load itself into the main view area only and the root tab bar will still be visible.

How can I replace the root tab bar with the tab bar for A?
siasl is offline   Reply With Quote
Old 01-07-2009, 06:42 PM   #4 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

no what im saying is have a regular XIB file and have four UIButtons and if they click one of those buttons then it will load one of the four other XIB files that are each Diffent Tab Bar Controllers
Bertrand21 is offline   Reply With Quote
Old 01-08-2009, 12:12 PM   #5 (permalink)
New Member
 
Join Date: Nov 2008
Posts: 74
SkylarEC is on a distinguished road
Default

I assume you're working off of the UITabBar starter project in xcode.

If this is the case, then your solution is simple. Very simple.
  1. Start off by creating the controllers that you want.
  2. In this method:
    Code:
    - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
    set up a switch, or series of if statements to figure out which tab bar controller was selected using the tabBarController object.
  3. In the code for tabControllerA, and in that same method in which you set up your tabbarcontroller check, add in a line like this
  4. Code:
    [window addSubview:someOtherTabBarController.view];
  5. To remove a sub tab bar controller, just have that same function call
    [someTabBarController.view removeFromSuperView];

Last edited by SkylarEC; 01-08-2009 at 12:15 PM.
SkylarEC is offline   Reply With Quote
Old 01-13-2009, 01:50 AM   #6 (permalink)
Registered Member
 
Join Date: Dec 2008
Posts: 17
siasl is on a distinguished road
Thumbs up

Thanks for the suggestion. I will try out the same.
siasl is offline   Reply With Quote
Old 01-15-2009, 12:59 AM   #7 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 3
untitled is on a distinguished road
Unhappy Nesting a Tab Bar within a UIView

sorry.
untitled is offline   Reply With Quote
Reply

Bookmarks

Tags
tab bar controller, tabbarcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 398
14 members and 384 guests
7twenty7, blasterbr, buggen, chiataytuday, dedeys78, dre, fiftysixty, HemiMG, jimmyon122, jonathandeknudt, LEARN2MAKE, pungs, tymex, UMAD
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,669
Threads: 94,121
Posts: 402,903
Top Poster: BrianSlick (7,990)
Welcome to our newest member, dedeys78
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:04 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0