views:

45

answers:

2

Hello everybody. i am making a tabbar based app. but the problem is i have several views like login view and a tableview that has to be shown before the tabbar view. My problem is if take a tabbar based application it dosnt have a navigation controller, so when i want to push the another viewcontroller from the tableview controller it is not possible. the flow of my app would be:

first screen loginview -> TableView (rootviewcontroller) -->tabbar View.

I am adding the loginview from appdelegate using addSubviewmethod. Then from LoginViewController i do the following :

myAppDelegate *appDel=(myAppDelegate*)[[UIApplication sharedApplication]delegate];
[aapDel.view addSubview:myTableViewController.view];

Now if i want to push something from the myTableViewcontroller it does not respond. moreover there is no navigation bar on the mytableviewcontroller. Plz help me.

A: 

Simply create your own navigationController =)

eviltrue
thnx.i already did that. i was doing somethng wrong somewhere so it wasnt working the way i wanted. now everythngs fine
Jayshree
+1  A: 

Maybe, the easiest way here is to add UINavigationController to the main window (UIWindow). And hide it on the first screens? And then you can use self.navigationItem and self.navigationController in you code (from any view controller, pushed to UINavigationController) to push/pop other ViewControllers.

kpower