Navigation Bar and navigation items not visible on runtime - ios

I don't understand why SignIn and SignUp navigation Bar and the back buttons are not visible even when embedding both of these views in the navigation controllers.
Is there anything else we have to do in code. All top bars are inferred in this case and I haven't touched the visibility of any.

There is no back button because there is nowhere to go back to. Your sign up and sign in view controllers are the root view controllers of their respective navigation controllers.
There is no visible title because what you are looking at is the navigation item of the tab bar controller, which has no title.
Your architecture posits a navigation controller insider a navigation controller, which is illegal:
nav controller -> tab bar controller -> nav controller
You can't do that.
Also you can't put a tab bar controller inside a navigation controller. A navigation interface inside a tabbed interface is fine (as illustrate in Apple's own docs: https://developer.apple.com/documentation/uikit/uinavigationcontroller). The reverse, a tabbed interface inside a navigation interface, is not.
The simplest solution is to eliminate the first navigation controller completely, as there is no need for it (you are not pushing anything onto it beyond its root view controller).

IN SIMPLE TERMS
Logically, your Tabbar should not be embedded in a UINavigation Controller. Instead, delete the NavigationController and make the Tabbar the root Viewcontroller then embed each UIViewcontroller in a separate Navigation controller

Related

Navigation Bar not showing in embed Navigation Controller

I'm trying to display the navigation bar at the top of the screen, but it's not showing in embed navigation controller.
Here is how it is in the storyboard:
And here it's in the simulator:
As you can see, I created a custom TabBar (following this tutorial) at the bottom of the screen so I can navigate between the different views.
I believe that I'm going to have to load the navbar programatically because the only solution that I found was to set the navigation controller as the initial view controller, but I already set another view as the initial one so I can't do that.
Issue :
When you instantiate a viewController using storyBoard identifier they wont come with free embedded navigation controller, even if you have added a NavigationController to them. As a result you are adding a viewController without navigation bar to your tab bar VC.
Solutions:
Solution1: If you want each child viewControllers to carry their own navigation controller hence their own navigation stack, provide a storyboard identifier to Navigation Controller behind your child viewControllers and instantiate the Navigation controller itself rather than ViewController. And add NavigationController as you tab bar looking VC's child. Because navigation controller loads the embdedded VC by default you will see your child VC with nav bar.
Solution2: All that you care for is only nav bar than add the Navigation Controller behind the VC containing tab bar looking View.
Hope it helps
Have you tried constraining the navigation bar to your view? Otherwise it can move offscreen.
You need to point the tab bar controller segue to the navigation controller of your view - otherwise if you point the segue straight to the view you're just loading the view without any navigation controller attached.

What type of view controller is used for this app?

Does anybody know what kind of view controller this app uses? I am trying to implement one somewhat like this but can not get the tab bar to appear at the bottom when I use the table view controller. I also can not get the title of the view to appear at the top where it says home.
I would say this is a tab bar controller. The home tab you show may just have a navigation bar placed on top of it as a sub view or it is embedded into a navigation controller.
My image shows a tab bar controller as the root controller and initial controller and the view from the first tab embedded in a navigation controller.
Hope this helps!
The screen you are looking at is a combination of a UItabBarController a UINavigationController and a UITableViewController.

UITabBarController with many UINavigationControllers?

I need some help figuring out the anatomy of my app.
What I need is a tab bar that also have a top navigation bar. And then each view controller within the tab bar will need to have buttons that can transition in new views within this tab. Does that make sense?
So my question is, how should I set this up. Should it be a main tabarviewcontroller and then each view has a separate nagivationcontroller? Or should it be a navigation controller that has the tab bar as a root. And then just use that navigation controller to do any transitions within the viewcontroller?
Thanks!
Your main view can be a UITabBarController, and you can add your UINavigationControllers to the tab bar viewControllers array. Each navigation controller will have a separate navigation bar and function independently. Clicking on a tab will switch to the appropriate navigation controller.

How to prevent tabbar from hiding with SWRevealViewController?

I'm trying to find out why any ViewController, that I push onto navigation stack does not show tabbar. Now I have construction like this:
loginVC -> navigationController -> SWRevealVC --> (leftPanelVC and second segue is to tabbarController, which has 4 its own view controllers). When I push view controller from any of this 4 controllers I'm loosing my tabbar and I cannot bring it back. Tried hidesBottomWhenPushed but it didn't work out as expected. Anybody?
EDIT:
What I just tried, was to set connections like this: login -> tabbarcontroller -> as first subcontroller I set up SWRevealViewController and hooked to it front navigationController and rear tableController. Unfortunately it messes stuff a bit, because tabbar now stays always, even on top of rear controller... the look I'm trying to get is interaction like in facebook app, where tabbar is always visible, but as a part of front controller, not overlaying rear.
When I push view controller from any of this 4 controllers I'm loosing my tabbar and I cannot bring it back.
I am not sure what you are doing here, but as far as I understand, you have:
pushed a tab bar controller on to a navigation controller;
from that tab bar controller, pushed a new view controller on to the navigation controller.
It that is correct, than it is normal that your tab bar controller tab bar "disappears" since you are pushing a new view controller (point 2) on to the navigation controller and this will replace the tab bar controller as the top most controller in your navigation controller.
Possibly, what you are looking for can be obtained by embedding a navigation controller inside of a tab bar controller, but I do not have enough info about your UI to be sure this makes sense.

Navigation bar from tab bar controller hides child's nav bar

I am confused with behavior, I have Tab Bar Controller ( I enter on this controller from simple view controller which is embedded in navigation controller). I am confused why is that navigation bar from tab is covered up child navigation bar.
When I start app and I enter at Browse Controller I cannot see Browse title, neither nav bar items which I added programmatically. Can somebody give me clue what is wrong ( I am new to this, I connect with push segue from tab to browse).
Your problem appears to be the same as the one I addressed here:
Push segue from a view controller controlled by UITabBarController
What's happening is that your first NavigationController is creating a Navigation stack. Then you push-segue a TabViewController. That is added to the Nav stack, along with each of it's contained view controllers. However, when you PUSH SEGUE from one of those view controllers to some other view controller, the original navigation controller's stack is the one you are pushing on to. This is not contained inside the tab view controller, so the pushed view controller has no relationship with that tab view controller, just the original navigation controller stack. Therefore the tabs are not present.
The answer is to embed each of the tab controller's view controllers in a new navigation controller, and push on from those. The original navigation controller is just messing things up here...

Resources