Tab bar disappears after touching cell in tableview - iphone

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

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.

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!

UIViewController in a UITabBarController without tab bar item

So I have this application where I have a view controller (which I want to appear first when the app starts) and a tab bar controller. I also have other navigation bar controllers that are in the tab bar controller. I want to place my view controller on top of the tab bar controller. Making the tab bar controller the parent of the view controller would be better though.
But take note, I do not want a tab bar item to represent the view controller and I want the tab bar to appear along with the view controller. I do not and would not want to use storyboards as much as possible. How can i achieve this?
I guess the simplest solution would be to use a screenshot of your tabBar and put it in your HomeViewController as a button. In this case you could use your HomeViewController as rootViewController and in the button action you set the TabBarController as the rootViewController.
Root = Home + Button
-->
Root = TabBar
Perhaps you need four buttons, if you want the correct tab to be selected.

How to retain tab bar after modal segue?

I have 3 View controllers in a tab bar. (my 3 icon). I have another view controller that is accessible from one of the 3 via a button. I do not want this extra view controller to show on the tab bar though.
On clicking the button with a push segue nothing happens, with a modal segue it opens the new page, but the tab bar disappears. (Even though I created a relationship from this new view controller to the tab bar).
How do I get the tab bar to remain? I don't really want to set up a navigation controller between my one view and the other (not on the tab bar) because it's not really hierarchal content.
Is modal actually the right segue to use?
Does your views (the views of the 3 views controller) contain the tab bar? If not, you may try transiting from the view to the view of the extra view controller.
see +[UIView transitionFromView:toView:duration:options:completion:]
When you select a Modal segue, the new view is not added as part of the current TabController stack. That's why the tab bar is not visible when you go to this view, and it's why a Push segue does not work for you (you can't push a VC that's not part of the stack).
From the sounds of it, if you want the tab bar to remain visible/useful but don't want to add this VC to the tab bar, what you're really saying is that this VC is a sub-view of one of the original 3 VCs in the tab bar.
In which case you could manage instantiation of your "custom" VC from within one of these original VC's, and add it as a sub-view?
For example if you've got: Tab1, Tab2, Tab3 and ExtraView
in Tab2 VC you would init/alloc SubView and do: [self addSubView:ExtraView.view];
Unfortunately, of course this way you lose Segues, but unless you want to go ahead and set up Tab2 as nested NavigationController in Storyboard, I think that's your best bet.

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.