View connected to UITabBarController not displaying tab bar - swift

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.

Related

Apple's Blue Warning Bar overlaps the NavBar of my Navigation Controller

I have a view setup inside a UINavigationController. The Blue Warning Bar displays over the top of the NavigationController's NavBar. In another part of my project I have another UINavigationController setup inside a UITabController. The NavBar allows enough room for the Blue Warning Bar to display without an overlay.
What am I missing? How can I prevent the Blue Bar from overlaying the NavBar?
Blue Bar of Shame
I figured it out!
Here is what was actually happening:
I have a View Controller inside a Navigation Controller. This View Controller contains a list of “Appointments”. When the user taps on an “Appointment” the application segues to a detail view that uses a Tab Bar Controller with five tabs, each of which have their own Navigation Controller. The first tab has an address field that allows the user to launch a Navigation App (Apple Maps, Google Maps or Waze) by tapping on it.
After opening the Navigation App, if the user returns to my application while the navigation app is still open and they did not provide the proper permission to suppress the Blue Bar of Shame, then the Blue Bar of Shame is displayed above my Navigation Bar, as it should be. If they then tap the back button to dismiss the Tab Bar Controller and return to the original Navigation Controller, the Blue Bar of Shame is overlaid on top of the Navigation Bar.
I'm not sure if this is a bug with UIKit or not.
What I did to work around this:
I changed the manner in which an Appointment List selection opens the selected Appointment's Detail. I was using a simple segue. For some reason when navigating back to the Appointment List view from the Appointment Detail, the Appointment List view's Navigation Bar was not accounting for the expanded status bar when the Blue Bar of Shame was displayed. I ended up completely replacing the rootView, which was displaying the Appointment List, with the Appointment Detail Tab Bar Controller. When transitioning back, I do the same thing in reverse - replace the Appointment Detail with the Appointment List; this seems to have alleviated the rendering problem.
I then created an extension for UIWindow to emulate the default navigation style transition during the rootView replacements.

Remove tab bar controller from view controller

I have a view controller which is connected my tab bar controller. This view controller also has a segue connection to a pop up view controller. As shown in the image below.
The problem is having is that the tab bar is being placed at the front of my pop up view controller like below.
I don't want this to be clickable since some weird behaviour happens when you press an item on the tab bar. So is there a way to send this to the back or hide this tab bar controller?
It's worth noting that in the class for this view controller there isn't an IBOutlet for this tab bar controller so i'm not able to access it in this view.
Removing a tab bar controller from a view controller where a pop-up or alert is only partially covering the background (or parent) view controller could be confusing or wierd looking to the user.
If you have access to your tab bar controller via an IBOutlet, you could disable touches to it by setting .userInteractionEnabled to false and setting the alpha of it to 0.7 or 0.6, giving an impression that it's temporarily disabled while the pop up is appearing.
If you don't have access to your tab bar controller (I just noticed that comment in the last sentences of your question), you could also register a notification observer in the class that does hold the tab bar controller outlet and you can send custom events (that you define) like "popupViewAppeared" and "popupViewDisappeared" to enable/disable the tab bar controller.

Storyboard still shows 'ghost' tab bar item after tab bar removal

In our current project we had a tab bar controller, and every corresponding view had a tab bar controller. Lately we decided to use another navigation approach and we removed the tab bar controller.
Unfortunately the tab bar items in the views seem to be unremovable in the SB. In the running app they are not visible. We even tried to reconnect them to a tab bar controller, but no avail. Also, they don't show up in the document outline.
Is there anyone who can spread some wisdom how to remove them?
Try making the bottom bar to none in the attribute inspector of viewcontorller

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