Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

siva.d

macrumors newbie
Original poster
Sep 30, 2008
13
0
Hyderabad,India
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

macrumors newbie
Original poster
Sep 30, 2008
13
0
Hyderabad,India
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

macrumors newbie
Original poster
Sep 30, 2008
13
0
Hyderabad,India
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) level3View:(id)sender{
UITabBarController *tabBar1=[[UITabBarController alloc] initWithNibName:mad:"tabBar1" bundle:nil];
WorkspaceViewController *workspaces=[[WorkspaceViewController alloc] initWithNibName:mad:"Workspace" bundle:nil];
ContactsViewController *contacts=[[ContactsViewController alloc] initWithNibName:mad:"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):confused:

How to get those tabs visible.

please....
 

siva.d

macrumors newbie
Original poster
Sep 30, 2008
13
0
Hyderabad,India
Hi,

-(IBAction) level3Viewid)sender{
UITabBarController *tabBar1=[[UITabBarController alloc] init];
WorkspaceViewController *workspaces=[[WorkspaceViewController alloc] initWithNibName:mad:"Workspace" bundle:nil];
ContactsViewController *contacts=[[ContactsViewController alloc] initWithNibName:mad:"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.:D

but problem is my navigation controller is not working.:confused:
 

jnic

macrumors 6502a
Oct 24, 2008
567
0
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.
 

siva.d

macrumors newbie
Original poster
Sep 30, 2008
13
0
Hyderabad,India
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

macrumors newbie
Original poster
Sep 30, 2008
13
0
Hyderabad,India
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
 

Mili8Mac

macrumors newbie
Jul 16, 2009
4
0
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?
 

mraheel

macrumors regular
Apr 18, 2009
136
0
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.
 

Mili8Mac

macrumors newbie
Jul 16, 2009
4
0
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

macrumors newbie
Jul 16, 2009
4
0
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?
 

macfa

macrumors newbie
Apr 16, 2009
1
0
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
 

GS1971

macrumors newbie
Apr 9, 2010
1
0
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 !!
 

AbhishekApple

macrumors member
Aug 5, 2010
86
0
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.