Unwind Segue Hides Tab Bar - ios

I have the following layout :
Tab Bar Controller
Nav Controller
View Controller 1
View Controller 2
I am currently trying to unwind segue from View Controller 2 to View Controller 1. The segue works however the tab bar disappears. Is there any way where I can force the tab bar to remain without removing the navigation controller. I have already tried the follow:
setting the tabBar.isHidden property to false
unchecking the hide bottom bar on push
Any other ideas? Any help will be greatly appreciated.

If I right understand you have storyboard like this:
I don't want to be superficial, but you don't need unwindsegue. If is not like this, post your storyboard to give you the right solution.

Related

Why is the navigation bar not appearing in the Simulator?

In my application that I am building, I set up a navigation controller to control navigation through the app. I created a Root View Controller.
I linked that Root View Controller to another View Controller using a show segue. Now the View Controller displays the navigation bar with the Large Titles turned off in the storyboard.
Even though it is showing up in the storyboard when I click the plus button, the navigation bar is not showing up in the Simulator. Does anybody know why?
Here is the complete Storyboard (Navigation Controller on the left - Root View Controller in the middle - Add View Controller on the right).
If someone could help me with this that would be amazing. Thank you.
You can retrace the steps and see where it went wrong:
1: Create a new single page app. Remove the VC and add TableVC. Set as root VC.
2: Select TableVC, Editor -> Embed in navigation controller.
3: Add tab bar item to the added navigation bar of the TableVC.
4: Create another VC and control drag from tab bar item to the VC (a push segue).
picture
Hi!Have you linked the Storyboard with ViewController like picture?That could be one reason.

iOS tab bar controller adding a navigation button at the top of the controller

So I have a UITabBarController and it has three buttons on the bottom in my iOS app. I want to add another set of buttons at the top but not quite sure on how to do this. I tried adding a UINavigationBar and a navigation button, and adding a view in to it, adding just the buttons, ect.... but to no avail. It won't let me add anything to the UITabBarController. Is there a way to do this?
Thank you very much.
the simplest way to that is to creat 3 buttons side by side and set their frame the way they divide the top of screen to 3 equals. it means u can create a tab bar with buttons manually.
but there's another way. i think this answer would help u
Positioning UITabBar at the top
To use the navigation bar you need a navigation controller. Now depending on your needs your tab bar controller should be inside a navigation controller or the other way around. If you want to be able to navigate away from the tab bar controller (have a screen without the tab bar) you should embed your tab bar controller into a navigation controller. If you only need the navigation bar for some tabs of the tab bar controller or you still want the tab bar to be visible all the time you should embed all (or just the ones than need a navigation bar) your root view controllers for each tab in navigation controllers. Finally if you do not need the navigation behaviour you could just put a regular view in the view controller that needs the bar at the top and some buttons in it and make them look the way you want.
You can embed a view controller in a navigation controller in a storyboard by selecting the view controller and the going to Edit->Embed in->Navigation controller.
Select the Any Tabbar ViewController then above the Menu -> Editor -> Embed In -> Navigation Controller its select, if you get the Navigation Controller then if you add the Navigation Button at Top of the ViewController, example :

Swift/XCode 6.4: add back button to navigation controller in navigation bar

In my app I have this storyboard:
and I would like to add a back button from the second table view back to the first. So I inserted a Navigation controller in order to have a navigation bar in the second table view ad I have created a segue with its identifier from the second table view to the first. But then how can I add a back button? I have tried to drag a button from the library into the navigation controller but it won't let me do it...I had already done this but in this moment I can't remember how.
Please can you help me?
In above image you shared you are making your tableview controller as root view controller.You have to kept your navigation controller on root. As you can see in attached image and you don't have to make back button manually as navigation controller has its own default back button.
This example is right how to make storyboard.Try it
self.navigationController?.navigationBar.hidden = false
In setting of UINavigationController set up like on screenshot
If you're using a navigation controller and its default navigation bar, you don't add an explicit back button--the navigation bar does it for you. You can add a UINavigationItem to your view controller, on which you set a title, back button title, etc.

Modal Segue Into Navigation Controller with No Nav Bar

In my storyboard I have a view with a segue into a new view that's embedded into a Navigation Controller (so the segue points to the navigation controller). I have the segue set to a Modal transition, however when the new view is animating up, it contains the standard blue navigation bar above the view (which then animates out of view).
Here's what it looks like mid segue: http://i.imgur.com/3eqAQ.png
How do I make it so the modal view animates up but without the navigation bar?
I have tried hiding the navigation bar in the embedded view's init, viewWillAppear, and vieWillLoad methods and that doesn't work.
I event went so far as to create a custom subclass of UINavigationController and set the navigation controller in the storyboard to it.
Thanks!
This may sound pretty simple, but have you tried hiding the navigation bar immediately before the modal segue starts? I had this problem when presenting a modal view controller and adding a [self.navigationController setNavigationBarHidden:YES] immediately before the presentation did the trick for me.
I had almost the same problem, but I wanted to get a navigation bar for my modal transition, as it was always hidden.
There may be two ways for you to remove the navigation bar:
Make sure that your view controller is not embed in a navigation controller, as it would put one by default
Check the "Top Bar" attribute of your previous controller in the workflow and work with none/inferred values depending on your storyboard.
Regards

Change from one navigation controller to another

I have application with 2 tab bars. In second tab bar I have navigation controller. I want to change this navigation controller to another navigation controller when "Change" button is pressed. How can I do that? Please help me.
Thanks
You'd have to replace the View Controller in the TabBar using the viewControllers property of UITabBarController or setViewControllers:animated:if you want to add some animation.
But maybe you should think of having 2 views in a controller of yours and hide/show them when you click a button, maybe even pushing/popping view controllers without animation (pushViewController:yourController animated:NO) on the navigation stack of your navigation controller and just hide the back button (self.navigationItem.hidesBackButton = YES)

Resources