Tab Bar Disappearing After a Segue - ios

I looked at the following two resources: Tab bar disappears after segue and My Tab bar controller disappears after a push segue. However, both of them are in Objective-C and they don't seem to address the issue that I am having.
Here is my Main Story Board:
Zoomed in is:
Now, let's call the view controller that has Sign Up and Log In VC1 and the one with the Facebook button, VC2. When I go to VC1 from the Tab Bar Controller, everything is good. I have the tab bar on the bottom of my VC1. And I tap Sign Up and the tab bar is gone. Which I want. And when I go back to VC1 (there is a navigation bar on VC2 with the button cancel that I programmatically added in, and when clicked on, takes me to VC1), the tab bar is gone. But I want the tab bar there.
Some people have suggested me to use a navigation controller. But I do not want to use it because I don't want the tab bar to appear when the user clicks on Sign Up. And, the navigation controller only allows for right to left and left to right segues and I want custom segues (I tried customizing the segues for a navigation controller and it caused a crash for me).
So my question is, does anybody know how to keep the tab bar on VC1 AFTER going to another View Controller WITHOUT a tab bar, and going back to VC1 WITH the tab bar?
Sorry for the long post.

Related

Tab bar not visible on Tab Bar Controller on reverse Segue operation

So, I am still in a learning phase of iOS programming using Swift and got stuck in one issue.
I have a Tab bar controller with options in the tab bar at the bottom.
In one of the tab pages, I have table cells, on click of each, I move the user to a WebView (Embedded in a UIViewController).
On the webView I have placed a back button, which is linked to the main Tab Bar Controller through a segue.
I am able to come back to tab bar controller successfully, but after coming back the tab bar at the bottom does not show.
Also, how can I remove the "
I have attached the main.storyboard screenshot for reference.Main Storyboard flow
I got it working by using the Segue type as "Show Detail" instead of just "Show".

Navigation Controller doesn't appear on Dashboard ViewController

I am using a Navigation Controller in Xcode8, the navigation bar doesn't appear on the following View Controller on the Dashboard. They will appear on the simulator and on the ViewController topDown tree, but nothing on the view of the dashboard.
Navigation Controller Screenshot
Its'a strange problem, It always happen to me too. You can change your segue type to deprecated Push to see nav bar, after that you can change again.
When you connect your navigation controller to the view controller it happens, because it creates segue type to Show. When you change the segue type to Push segue, you can see the Nav Bar on your View Controller.
Just click the segue, you should see the segue options on the right like the picture.
The problem was the segue before the Navigation Controller. When I delete it, all the Navigation Bar come back. Don't know why, but if the problem happen, you just have to delete this segue and then with Ctrl+Z, the segue come back and the nav bar stay

navigation bar states, showing and hiding the bottom nav bar

Keep in mind with the following question, I am still an iOS noob.
So I understand how to hide/show/recolor the navigation bar and whatnot. My next challenge is that some screens need the nav bar and others do not.
When my app starts off, I have the nav bar as hidden and then the user can click register or log in (both of which screens have a nav bar).
So those screens have the code to show the nav bar all while the first (welcome screen) has the code to hide the nav bar.
Here is the question: Why is it that when I first start my app, the nav bar is not there, but when I go to register/login and then hit the back button to return to the welcome page (initial page) then the nav bar is still there, even though my code to hide it is in the viewDidLoad method?
How can I fix this?
You can try moving the logic of hidding the Nav bar to the ViewWillAppear method, you just need to override it in your View Controller class.
Alternatively I would suggest to use a separate view controller to handle your login/registration screens and only use nav bars where you need them. You would have to create a view controller in your story board with your regular screens and embed the screens that need the tab bar in a navigation controller, You can then segue from your regular view controller into the navigation controller that includes your tabs.
Hope this helps

SWRevealController not working with NavigationController

In my previous question, i asked about including a log in page with my SWRevealController slide out menu before moving onto a home page. The solution was the following set up:
However, i need a navigation bar in order to house the button to open the menu (the navigation bar wont cover the status bar). When i insert a NavigationController in the following way, the menu no longer works
Why does this happen?
Put your Navigation Controller before Login/Signup Controller, then in viewWillAppear of Login/Signup Controller, hide the navigation bar

Implementing a slide-out menu bar after a login screen in xcode

I have been following the appcoda tutorial (http://www.appcoda.com/ios-programming-sidebar-navigation-menu/) on how to implement a slide-out menu bar for my app using SWRevealViewController. I am wanting to show the slide out menu after the user has logged in.
My root view is the login page. I created a reveal view controller like the tutorial, and put it after the login page. However, when I get to my root view, it displays a back button instead of my slide out bar. In the console, I am getting errors such as "Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted." and "nested push animation can result in corrupted navigation bar".
I have attached an image of my storyboard. Would I need to implement another navigation controlller in the storyboard?
When you navigate from your login View controller to SWRevealViewController, you should hide the navigation bar, which covers the other navigation bar inside SWRevealViewController.
What I did is to hide the first navigation controller's navigation bar in prepareForSegue function of login page controller.

Resources