Navigation Controller with Tab Bar only on first view - iphone

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;
}

Related

Perform Button Segue to Table View Controller within Navigation Controller

I have a main screen that is a Tab Bar controller with 4 tabs. One of the tabs takes you to a navigation controller where you can click through 3 different Table View Controllers.
I also have a button on one of the other tabs. I would like this button to take the user to the end of one of the Navigation controllers.
I can perform the segue just fine, but when I use the button to get to the View Controller, the tabs on the bottom aren't there, it's just a table.
Is there any way I can segue to a View Controller within a Navigation controller from outside the navigation controller and still have the tab bar showing?
Here are some pictures of what I mean:
See how at the bottom of this page there is the tab bar still? This is when you get there from the navigation controller
And in this picture, there is none (This is the friends page, same as picture above). I arrive at this by using a segue from a button from one of the other tabs.
Please let me know if I need to be more descriptive but I can't figure out how I can make this happen. Thanks for the help!

how to add a uitab bar controller with non of the tab get selected?

I have added an UITabBarController. My requirement is to display a view with tab bar controller. but that view is not part of the tab bar items. For example my tab bar contains 3 tabs
contacts
camera
history
Generally if we add tabbar controller contacts will be get selected and that view will be displayed automatically. but i don't want in that way...
i used [tabBarcontroller setSelectedViewController=nil];
i am able to get a tab bat with non of the tab get selected. but when i am trying to select a tab item it's not working.. I think i set the selectedViewController to nil. is there any other way to achieve my requirements...?
please explain your answer clearly.. i am new to iphone app development..
Present a view controller which is not a part of your tab bar controller and put a tab bar image/buttons at the bottom of it which resembles your tab bar. When you receive a button pressed message from within that view controller, show that tab on screen.

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...

Add view controller over tab bar based application with navigation controller?

I want to add a view controller over navigation view controller in a tab bar application which covers the full screen.
I have crated a view controller (enterPin) and added over the current navigationview controller in a tab bar application.
[self.view addSubview: enterPin.view];
but bottom bar, navigation controller and status bar is not hidding and comes over enterPin view controller. If we hide bottom bar, navigationcontroller and status bar it give white screen at back.
I want the view controller (enterPin) should appear over the navigationview controller (self.view).
Use modal view controller: Tutorial and documentation. Does exactly what you are asking for.
This is very normal behavior. 95% of the time the developer would not want the UINavigationBar to be covered by another view. You have a few options.
Use a modal view controller to prevent the user form interacting with other controls.
Animate the UINavigationBar out or disable it in some way.
Consider making the "Enter PIN" screen something the user sees when they first launch the application.

Tab bar navigation

I have made an application in which I have four tab bars. I have used the below code to go to the second view in a button's click method. It goes to the second view but the second view is not showing with tab bars. How can I fix this?
- (IBAction)Existinguser:(id)sender
{
ExistingUserViewController *existingUserViewController =
[[ExistingUserViewController alloc]
initWithNibName:#"ExistingUserViewController" bundle:nil];
[self presentModalViewController:existingUserViewController animated:YES];
[existingUserViewController release];
}
Presenting a view controller modally will show that view controller above all ther other UI elements (this includes the navigation bar and tab bar, but not the status bar).
If you want to show your "second view" as the view on the second tab, then you need to set the view controller you want to use as the second tab's view controller. That way when you press the second tab, the second view controller will be shown, and the second tab will be selected and visible.
I might be mistaken, but do you have a single tab bar with four tabs and you are looking for a way to change to the second tab? You can do this with the following code:
self.tabBarController.selectedIndex = 1;
btw the code you attached to your question is displaying a new model view controller above the current view controller. This is the reason no tabbar is shown.
If you are trying to create a navigation based app using tabbar, in IB, change the tab's viewcontroller to UINavigationController. You can then use the UINavController methods to navigate between views. In case you don't want to show the navbar, just set that property in IB.
Here's a good example of how you can use tab bar with navbar