Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Oct 29, 2008, 07:36 AM   #1
siva.d
macrumors newbie
 
Join Date: Oct 2008
Location: Hyderabad,India
Send a message via Yahoo to siva.d Send a message via Skype™ to siva.d
Navigation Controller + Tab Bar Controller needed

I started doing iphone application development from one week.

I have probelm :

1) I need a welcome view controller initially without any "Navigation controller" and "TabBar Controller".
I have a button in this viewController. so when i click on that button it should goto login view.

2)In login view also i don't need "Navigation controller" and "TabBar Controller".
Here when i click login button, it should goto main view.

3)In main we i need navaigationa controller as well as Tabbar Controller.

If you have any sample code please send me.

welcomeViewControler --> loginViewControler --->mainViewController.

I want to learn how it works with IB.

Thanks in advance
siva.d is offline   0 Reply With Quote
Old Oct 30, 2008, 09:22 AM   #2
jnic
macrumors 6502a
 
Join Date: Oct 2008
Location: Cambridge
Take a look at the UICatalog code sample (http://developer.apple.com/iphone/li...log/index.html) for examples of the various IB components and switching between views.
jnic is offline   0 Reply With Quote
Old Nov 2, 2008, 10:58 PM   #3
siva.d
Thread Starter
macrumors newbie
 
Join Date: Oct 2008
Location: Hyderabad,India
Send a message via Yahoo to siva.d Send a message via Skype™ to siva.d
want NavigationController+ TabBarController in a viewController.(not in AppDelegate)

Thanks for your replay

i seen examples which can give NavController and TabController Form appDelegate using IB.

But i need Those Controllers(NavBar and TabBar) in a ViewController. In the same viewController, i want TableView also.
siva.d is offline   0 Reply With Quote
Old Nov 3, 2008, 12:31 AM   #4
siva.d
Thread Starter
macrumors newbie
 
Join Date: Oct 2008
Location: Hyderabad,India
Send a message via Yahoo to siva.d Send a message via Skype™ to siva.d
TabBarController

Hi,

i have created a TabBarControler Using IB.

I have assigned two nib files for two tabs of that TabBarController.

I am calling that TabBarController nib file like this(in a button click action)

-(IBAction) level3Viewid)sender{
UITabBarController *tabBar1=[[UITabBarController alloc] initWithNibName:@"tabBar1" bundle:nil];
WorkspaceViewController *workspaces=[[WorkspaceViewController alloc] initWithNibName:@"Workspace" bundle:nil];
ContactsViewController *contacts=[[ContactsViewController alloc] initWithNibName:@"Contacts" bundle:nil];
tabBar1.viewControllers=[NSArray arrayWithObjects:workspaces,contacts, nil];
[self setMyTabBar:tabBar1];
[[self navigationController] pushViewController:myTabBar animated:YES];
}

It is working without any error.

Tabbar is visible, But Tabs are not visible on new view(displaying empty tab bar)

How to get those tabs visible.

please....
siva.d is offline   0 Reply With Quote
Old Nov 5, 2008, 04:34 AM   #5
siva.d
Thread Starter
macrumors newbie
 
Join Date: Oct 2008
Location: Hyderabad,India
Send a message via Yahoo to siva.d Send a message via Skype™ to siva.d
Hi,

-(IBAction) level3Viewid)sender{
UITabBarController *tabBar1=[[UITabBarController alloc] init];
WorkspaceViewController *workspaces=[[WorkspaceViewController alloc] initWithNibName:@"Workspace" bundle:nil];
ContactsViewController *contacts=[[ContactsViewController alloc] initWithNibName:@"Contacts" bundle:nil];
tabBar1.viewControllers=[NSArray arrayWithObjects:workspaces,contacts, nil];
[self setMyTabBar:tabBar1];
[[self navigationController] pushViewController:myTabBar animated:YES];
}

My tab bar is displaying its tabs now.

its working fine.

but problem is my navigation controller is not working.
siva.d is offline   0 Reply With Quote
Old Nov 5, 2008, 06:42 AM   #6
jnic
macrumors 6502a
 
Join Date: Oct 2008
Location: Cambridge
Rather than creating the layout programmatically, it's probably simpler to use Interface Builder to add a Navigation Controller and Tab Bar Controller to the same view.
jnic is offline   0 Reply With Quote
Old Nov 11, 2008, 03:04 AM   #7
siva.d
Thread Starter
macrumors newbie
 
Join Date: Oct 2008
Location: Hyderabad,India
Send a message via Yahoo to siva.d Send a message via Skype™ to siva.d
Thank you jnic,

Ya i am trying to that using Interface builder only.

Do u have any sample application like that.

Can u send that to me

Thank you once again
siva.d is offline   0 Reply With Quote
Old Nov 14, 2008, 05:17 AM   #8
siva.d
Thread Starter
macrumors newbie
 
Join Date: Oct 2008
Location: Hyderabad,India
Send a message via Yahoo to siva.d Send a message via Skype™ to siva.d
NavgationController+TabBarController+TableView

I did this using Interface builder.

its working fine.

i want to share the code.

But i dont know how to attach the zip file here.

can any one help me?

thanks
siva.d is offline   0 Reply With Quote
Old Jul 16, 2009, 02:47 AM   #9
Mili8Mac
macrumors newbie
 
Join Date: Jul 2009
NavgationController+TabBarController+TableView

Hi Siva.d

I am new to iphone and I am facing the same issue.. From your post it is pretty clear that you have achieved your requirement long back.
I would be very thankful if you please share as to how did you achieve the solution?
Mili8Mac is offline   0 Reply With Quote
Old Jul 16, 2009, 03:05 AM   #10
mraheel
macrumors regular
 
Join Date: Apr 2009
I dont understand whats your main navigation control. The NavBar? or Tab Bar?
If its the tabBar? then you should add the tabbarcontroller first to your Mainview.xib. then add NavigationController to a tabbar.

You look like a beginner, I'm a little ahead of that, My advice is, to use IB effectively and where you can. In most circumstances, it does its Job. IB is there for a reason. To make our lives easier. Its hard to understand at first. But play around with it alot more and watch videos and tutorials.

You should choose ONE control as your apps backbone so to speak. Like a TabBarController can be your app's backbone. There can be views here and there.. without it.
mraheel is offline   0 Reply With Quote
Old Jul 16, 2009, 06:11 AM   #11
Mili8Mac
macrumors newbie
 
Join Date: Jul 2009
hello

my requirement is - my application's first screen is a login screen which doesnot require any tabbar. once logged in I have a Home screen which is basically a table view in a navigation controller. I need the tabbar from this screen onwards. How do I achieve it..If I take Tab Controller as the backbone I will be required to
1.first hide the tab bar in the first screen
2.second remove the first tab(basically resembling the first screen) from the tab bar in rest of the screens.

Please someone help me to as to how can I achieve this?

Thanks in advance
Mili8Mac is offline   0 Reply With Quote
Old Jul 16, 2009, 10:03 AM   #12
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by Mili8Mac View Post
Please someone help me to as to how can I achieve this?
Make the Tab Bar Controller your main view. (This is always good advice). Then make your login screen a modal view.
__________________
dejo is offline   0 Reply With Quote
Old Jul 17, 2009, 01:03 AM   #13
Mili8Mac
macrumors newbie
 
Join Date: Jul 2009
Quote:
Originally Posted by dejo View Post
Make the Tab Bar Controller your main view. (This is always good advice). Then make your login screen a modal view.
Hi dijo,

Thank you so much for responding.. As per your suggestion I looked into the concept of model view. But I am unable to find some relevant example to implement the same. can you please help me on this?
Mili8Mac is offline   0 Reply With Quote
Old Jul 17, 2009, 09:58 AM   #14
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Check out this tutorial, perhaps.
__________________
dejo is offline   0 Reply With Quote
Old Aug 25, 2009, 05:35 PM   #15
macfa
macrumors newbie
 
Join Date: Apr 2009
Hi All,
I am new to the iPhone development, gone through various docs and tutorials and worked on simple first app.

Now I need to develop a app for real.
Reading through this thread I am in need of a good example for
welcomeViewControler --> loginViewControler --->mainViewController

similar to siva.d original posts.

I have created a login view, and can create a separate table view.
Problem I am having is making them flow
Open Login View,
Display Main tab view controller.

Anyone have points to good sample good/tutorials showing this multiple views and transitions from one to another.

Thanks in Advance
macfa is offline   0 Reply With Quote
Old Nov 27, 2009, 02:37 PM   #16
paddoum
macrumors newbie
 
Join Date: Nov 2009
TabBar NavBar source code

You'll find the source of a project implementing a NavBar plus TabBar programmatically at the following address http://www.myfirstiphoneapplication.com

Last edited by paddoum; Nov 27, 2009 at 02:38 PM. Reason: typo
paddoum is offline   0 Reply With Quote
Old Apr 10, 2010, 12:40 AM   #17
GS1971
macrumors newbie
 
Join Date: Apr 2010
hihi Siva
Please can you forward your sample code to me for reference? I am looking for the solution as well, it will be hiiiiiiiiiiiiiiiighly appreciated to get an effort from you !!
GS1971 is offline   0 Reply With Quote
Old Aug 23, 2010, 01:03 AM   #18
AbhishekApple
macrumors member
 
Join Date: Aug 2010
Quote:
Originally Posted by siva.d View Post
I started doing iphone application development from one week.

I have probelm :

1) I need a welcome view controller initially without any "Navigation controller" and "TabBar Controller".
I have a button in this viewController. so when i click on that button it should goto login view.

2)In login view also i don't need "Navigation controller" and "TabBar Controller".
Here when i click login button, it should goto main view.

3)In main we i need navaigationa controller as well as Tabbar Controller.

If you have any sample code please send me.

welcomeViewControler --> loginViewControler --->mainViewController.

I want to learn how it works with IB.

Thanks in advance
Hi Shiv i am new to iphone n facing the same problem found ur quote on google pls will u exp with exmple hw to solve the abv problem..
Can't we use tabbar and navigationbar in view instead of tabbar controller and navigation controller in window
AbhishekApple is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
navigation controller bar is cutting off tranvutuan iPhone/iPad Programming 0 Sep 13, 2013 09:55 AM
Help. Navigation bar does not appear after pop the view controller. cthesky iPhone/iPad Programming 4 Nov 22, 2012 12:54 AM
About push view controller into a navigation controller stack. cthesky iPhone/iPad Programming 5 Nov 9, 2012 08:36 AM
Segue from Normal View controller to navigation controller daproject85 iPhone/iPad Programming 0 Sep 29, 2012 03:26 PM
Device orientation problems with tab bar and navigation controller daproject85 iPhone/iPad Programming 0 Sep 12, 2012 01:26 PM

Forum Jump

All times are GMT -5. The time now is 09:06 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC