Implement UItabbarController + UInavigationBar in project - iphone

I have navigation controller based project. In my project I have Splash Screen & Login Screen where i have hidden the navigation controller.
Now i have to implement TabbarController in the application and It need to be shown the screen after Login Page.
I want to add it in AppDelegate.But my problem is that I have set rootviewcontroller of Window as navigation controller.
And Now i want to use Tabbar controller also into the Appdelegate class.
I am finding difficulty into it.
Any help will be appreciated a lot.

What you can do is set the rootviewcontroller as a tabbarcontroller and add a tab for your login screen but make sure to hide the tabbar initially, after the user login, you can remove the tab programatically and show the tabbar.

Maybe you really need that kind of navigation in your application, to me it sounds a bit of a unnecessary workaround and against guidelines. Try having a look at Apple's ("View Controller Programming Guide > Combined View Controller Interfaces") and maybe you'll find a more elegant solution to your problem.

Related

iOS tabBarController is not displayed

I have a main tabBarController with some tabs as main controller and each tab contains some objects. Once a view is called, for example, pressing one cell of tableview, tabBar dissapears using,
AppsViewController.hidesBottomBarWhenPushed = YES;
[[self navigationController] pushViewController:AppsViewController animated:YES];
New view contains a new tabBarController but it is not displayed! How to solve it? If not possible, another option would be insert a tabBar (is displayed properly!) instead of tabBarController and then handle its control programmaticaly. How? any help would be appreciated. Thank you.
Honestly speaking i dont use Tab Bars . it gets very complicated in certain conditions to customize it. What i do is that i place some Custom Buttons in place of tabs. and let the designer do the rest. the images of the buttons look exactly like a tab bar in ur app and u can easily customize it the way u want it
i could have shown u the snap shot of my recent app which looks like a tab bar but consists of custom buttons
let me know what u think about it
Cheers
W
If you are talking about UITabarController you can't select a controller in a tab that is also a tabbarcontroller. The only way to do it is presenting it modally. In the hig and view controller programmming guide is clearly explained why. The reason is about view controllers hierarchies.

iPhone TabBar Controller Usage

I want make a typical tabbar based application.
And I want to insert login view on startup before main tabbar is shown.
I tried to insert TabbarController in main view, but cannot find appropriate code. All sample code I found is insert TabbarController on startup. (in Delegate file)
My fellow suggest create toolbar on startup but hide it at login view, but I am not sure if this is a general method or not.
In this case, what is a 'recommanded' handling method of TabbarController ?
A simple solution would be to
1-Add the tab bar to UIWindow in the appDelegate as is suggested by apple.
2-then add a UINavigationController in tabbar using tabbarController.viewControllers=[NSArray arrayWithObject:yourNavController];
3- Now after alloc init on your login controller write this code before pushing it to the navigation controller of the tabbar
yourLoginController.hidesBottomBarWhenPushed=true;
4- push yourloginViewController to the navigation controller of the tabbar.
5- After authentication before pushing your MainviewController instance on the navigation set it like this
MainviewController .hidesBottomBarWhenPushed=false;
I hope these five simple steps will do the magic for you cheers :)
Please let me know if it helps you.Thanks
The approach I use for login screens which works great is:
prepare and show the regular main screen (tab bar controller with whatever initial VC you want to use)
immediately present the login screen modally (without animation) from the tab bar controller (which will obscure the tab bar controller, which is what you want)
make the login screen the startup image

How to create a multiple view based app without using the navigation controller?

I am relatively new to programming for the iphone OS, but know the basics and some other things. What I am wondering is how would I program an app that acts like there is a navigation controller, just without the navigation controller bar that comes with it?
Try a UITabBarController : UITabBarController Class Reference.
You can hide the navigationBar that comes with the controller and maintain all the functionality that the navigationController provides. Pass the following method to the navigationController to hide/show the bar.
- (void)setNavigationBarHidden:(BOOL)hidden animated:(BOOL)animated
Another alternative is to have a main view that you swap out subviews from, using an animation as you add or remove views...
But using a navigation controller with the navigation bar hidden as Daniel noted is much simpler.

Problem Adding UITabbar to Existing UITableView - iPhone SDK

Wonder if anyone can help me with this problem. I have created a Window based application. I have then added a Navigation Controller to the Window (via Interface builder) and subclassesd UITableViewController and used the table delegates in this class to draw my root view table. This all works fine.
I am now trying to add a tab bar to the view. I have done this by dragging a UITabbar in Interface Builder onto the Main Window.
The problem is that when I launch the app, it looks like the table is now being drawn over the top of the UITabbar which therefore makes the UITabbar unaccessible.
Can anyone help me ?
Thanks in advance,
Martin
Have a look at View Controller Programming Guide for iOS : Tab Bar Controllers
If you want to add a tab bar to your application, it should be the main navigation base of your application. Navigation Controller can be part of each tab.
Create a tabBarController. Create navigation Controllers with appropriate View Controllers as its Root View Controller, add the Navigation Controllers into one array, set it to the viewControllers aray of tabBarController object and add the tabBarController.view to your window.
Have a look at this thread, both coding & IB approach has been explained here.
The better and easier approach would be to create UITabbar based application with navigation and add UITableView into that.

Customizing "More" Tab Bar

I am using a tab bar (UITabBarController) on my app and I wish to customize the appearance of the table that appears when you click the more button.
My app customized with a background image on every page. But image is not displaying when i click more button.
Any ideas?
If you're actually using UINavigationController embedded within a UITabBarController then the more item is a UINavigationController which exists as a property of your UITabBarController with the name moreNavigationController. You can manipulate it in methods of your UITabBarController just as you can any other UINavigationController.
HTH, Pedro :)
It sounds like you have a UINavigationController as the main VC of your app, and a UITabBarController as one of the VC's on its stack.
I believe Apple actively discourages people from doing this in their apps, and so do I. It is never done in the iOS itself, and I have never seen it in any third-party apps either, so users will probably be confused.
I think you should embed the UINavigationController inside the UITabBarController instead of the other way around, or you could just choose to use another way of showing what you want to show.
see UITabBarController's 'More' navigation controller disappears under UINavigationController