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 > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 06-30-2010, 08:42 AM   #1 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 2
lumala is on a distinguished road
Default Changing TabBar on-the-fly?

Hi guys, I'm quite new in iPhone Programming, but I'm trying to do my best cause I have some skills in OOP.

I'm creating an iPhone app based on a four element Tabbar. I would like to use other functionalities already implemented by a friend of mine in his own iPhone app (a three elements TabBar app).
Since I would like my app's users could "switch" to old application (3 tabs) by pressing on one of my app's tab, my question is: is it possible to do this, maybe by "popping out my tabbar" (4 tabs) and "pushing in the old tabbar" (3 tabs)?

For a better problem description, we could say that I'm trying to implement a "new mode" and "old mode" in the same application.

Thank you in advance.

P.S. I'm using Xcode 3.2.2 on a Macbook Pro coreDuo and 3.1.3 iPhone simulator

Luca
lumala is offline   Reply With Quote
Old 07-01-2010, 09:17 AM   #2 (permalink)
iPhone Developer
 
spikeyfish2's Avatar
 
Join Date: Aug 2009
Location: Manchester, UK
Posts: 140
spikeyfish2 is on a distinguished road
Send a message via MSN to spikeyfish2 Send a message via Skype™ to spikeyfish2
Default

Quote:
Originally Posted by lumala View Post
Hi guys, I'm quite new in iPhone Programming, but I'm trying to do my best cause I have some skills in OOP.

I'm creating an iPhone app based on a four element Tabbar. I would like to use other functionalities already implemented by a friend of mine in his own iPhone app (a three elements TabBar app).
Since I would like my app's users could "switch" to old application (3 tabs) by pressing on one of my app's tab, my question is: is it possible to do this, maybe by "popping out my tabbar" (4 tabs) and "pushing in the old tabbar" (3 tabs)?

For a better problem description, we could say that I'm trying to implement a "new mode" and "old mode" in the same application.

Thank you in advance.

P.S. I'm using Xcode 3.2.2 on a Macbook Pro coreDuo and 3.1.3 iPhone simulator

Luca

Couldn't provide any code as I haven't seen your source, but what I would do is have a method, say it's called "-(void)setMode", and in that method, have:

Code:
if (currentMode == oldMode) {

oldTabBar.hidden = NO;
newTabBar.hidden = YES;

} else if (currentMode == newMode) {

oldTabBar.hidden = YES;
newTabBar.hidden = NO;

} else {
    // error handler, or just set one of the above, or prompt user for mode
}

Of course, you would have to do the same for every element that would differ for each mode, so if that's too much, you could always set up 2 views/viewsets where one would be the old app, and the other the new.
__________________
 iMac i3 3.06GHz, 4GB RAM (Mid-2010)
 Magic Trackpad and Wireless Keyboard
 Licensed iPhone Developer (Alex Blundell)
 iPod Touch (3rd Generation)
 iPad 32GB WiFi
 Support Me! Download:
***iTalk Messenger
***Tennis
***iTalk Messenger Lite!
spikeyfish2 is offline   Reply With Quote
Reply

Bookmarks

Tags
iphone, tabbar, tabbar navigation ib

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: 374
10 members and 364 guests
.Snipe, AragornSG, baja_yu, ChrisYates, davejas69, guusleijsten, hussain1982, Kryckter, locombiano89, stanny
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,646
Threads: 94,111
Posts: 402,862
Top Poster: BrianSlick (7,990)
Welcome to our newest member, locombiano89
Powered by vBadvanced CMPS v3.1.0

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