iOS Navigation Bar in tab bar controller doesn't rotate properly - iphone

I have a tab bar controller whose 2 tabs both contain views with navigation bar controllers. When I display the app in portrait everything is fine, however when I display just the first tab in portrait, then rotate the device and display the second tab in landscape, the navigation bar of the second view stretches while the first stays in 'portrait size'. I have been able to replicate this in a basic project that I've uploaded to rapid share
I am guessing this is a easy fix.
Thanks in advance!

Found the answer. I had a view for each tab with a navigation controller within that view. By changing the tab view to a navigation controller instead, resolved this error.
Basically, my original setup was tab navigator -> view -> navigation controller
This I changed to tab navigator -> navigation controller
It works correctly now.

Related

View connected to UITabBarController not displaying tab bar

I have a UITabBarController. Originally I had it connected to 4 UINavigationControllers and each tab would function as expected. Each would navigate to the appropriate view and the tab bar would remain visible allowing the user to switch between tabs.
Now I wanted to connect another UINavigationController to the UITabBarController; essentially creating a fifth tab. I connected the UITabBarController to the new UINavigationController using a Relationship Segue successfully creating a fifth tab. However, when the fifth tab is pressed, the view is shown but there is no tab bar, thus preventing the user from navigating to any other screen.
The Bottom Bar setting is set to 'Inferred' just like the other views but it still does not show the tab bar. Why is the tab bar not showing and how can I make it appear?
Note that the UIViewController not displaying the tab bar has connections to it from other View Controllers but I don't see why this would affect the tab bar displaying.
Silly error on my part. The check box to Hide Bottom Bar When Pushed was checked so unchecking this solved the problem.

Navigation to Main Root Controller from Tabbar Controller

I am using storyboard, navigation controller in iPhone application. Then navigate it to another view where I have used Tabbar controller. Then in Tabbar controller, I've 3 tabs and each of them have their separate navigation controllers.
Now, After completed process. But when I navigate to Root, it does back with its own navigation controller inside of Tabbar controller.
Actually, I want to come back on main Navigation Controller of an application where application starts.
Basic Flow :: Main Window -> Navigation Controller -> Tabbar Controller -> Navigation Controller -> Button..
So by clicking on Button -> Back to Main Window... Any Idea to back to main root view.
But I'm stuck with this issue for navigation controller that can't back me to the application root.
Can anyone solve this issue?
Please tell me ASAP.
Thanks in advance.
Not really the answer you're looking for, but FWIW:
You should avoid hiding tab bar controllers inside other controllers so that the tab bar controller appears and disappears. This isn't how they are meant to be used. They're supposed to be a main part of the UI and if I see a tab bar controller I expect it be there at the heart of the UI, controlling access to the main parts of the UI, and visible pretty much all of the time if not all of the time.
Don't take my word for it, listen to Apple:
Appearance and Behavior
A tab bar appears at the bottom edge of the
screen and should be accessible from every location in the app. A tab
bar displays icons and text in tabs, all of which are equal in width
and display a black background by default. When users select a tab,
the tab displays a lighter background (which is known as the selection
indicator image) and its icon receives a blue glow.
Don't be terribly surprised if your app gets bounced from the app store for ignoring the human interface guidelines!
It's resolve with ::
[self.parentViewController.navigationController popToRootViewControllerAnimated:YES];
Enjoy coding..!!

iOS - iPhone app consists of tab bars containing navigation bars.. overlaying a modal view makes area over tabset hard to hit

I have an iphone app consisting of a tabbar controller in the main.xib, where the tab bar controller contains navigation controllers, which are associated with corresponding view controllers. I assume this is pretty standard.
If I present a modal view controllers view from a navigation controller contained in this hierarchy, the view owned by this view controller pops up as you would expect. However, Ive noticed if I have controls (such as a button) at the very bottom of this 'modally presented' view it is rarely detecting taps. It seems as though the tabset underneath is blocking the touches. Note that when I present the modal view controllers view it fills the visible screen, it isn't sliding up from underneath the tab set.
I thought this tababar controller->navigation controller hierarchy was pretty standard, shouldn't I be able to present a modal view controller from a navigation controller in this set up without issue? I have also tried to present the modal view controller from the tab bar controller, with the same effect.
How do I present a modal view controller in an app with the tabbar controller->navigation controller hierarchy such that the lowest portion of that view can detect touches?
thanks for any help!
Check out the first answer by Harry, I believe this set-up is related to your situation. Post an update and let us know if this helps: UIView doesn't resize to full screen when hiding the nav bar & tab bar
Also, what code are you using to present the modal view?

Tab bar disappears after touching cell in tableview

I have an issue with a tab bar app. I am making a tab bar app with three bars on the bottom. On my my first bar it is a tableviewcontroller. When i ckick on the table view controller it takes me to a different view (which doesn't have the tab bar). When I clicked back to the home screen (which has the tab) the tab bar is gone.If you need a picture i will post it!
You may have set your UITableViewController segue to a modal style. If this is the case, you should change it to a push style.
In order for a push to work, your view controller needs to be in a UINavigationController. In your story board, select your root view controller and embed it into a Navigation Controller like this...

Navigation Controller with Tab Bar only on first view

I am seeking advice on how to start my project.
I need to use a combination of the navigation controller and tabbar controller but on the second screen, I need the tabbar controller not to be there. Here is a brief description of the two main screens
Screen 1 will have a tabbar controller with two tabs. The first tab is a tableview and when you tap on a table cell, it drills down to Screen 2. The second tab is just a filter view that updates the table in the first tab of Screen 1.
Screen two is just a details screen from the cells of Screen 1. The catch is that I don't want the TabBar on Screen 2.
I am struggling with how to get started.
Do I start with a Navigation-based application since I need to be able to drill down? How do I just add a tab bar to the main screen of the navigation based app?
I can't start with a Tab Bar application because if I load a navigation controller inside one of the views of the tab controller, then when I drill down inside the nav controller, the tab bar still stays on the next screen when I need it to go away.
Any help would be appreciated.
Hide the tab bar once the 2nd view gets pushed. You can hide it in the viewDidAppear method and animate it so that it looks fluid.
The navigation controller has a property that will do the work for you (put this just before you call the nav controller to push the new view):
navigationControllerNameHere.hidesBottomBarWhenPushed = YES;
or
- (void)viewWillAppear: (BOOL)animated {
self.hidesBottomBarWhenPushed = YES;
}