Navigation controller and status bar issue - ios

I'm struggling to manage the status bar since I placed a Navigation Controller.
When my intro navigation flow passes only through ViewControllers it worked smoothly.
Now I put a Navigation controller in front of my introVC and the frame is shifted down by the size of the status bar as shown in the images linked below.
Now how it looks like :
I cannot understand how to solve it, can you please give me some advice?
Here my Storybord :
Michele

Have you embed your introVC into a Navigation controller or how did you connect those two?

Related

Unwind Segue Hides Tab Bar

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.

Using UITabBarController with UINavigationController - Swift 3

I am making an app which requires a use of a UITabBarController along with UINavigationController. I have made the following flow in storyboard.
See image
Now the first question is that is this accepted by Apple, as there are too many discussions for the same.
The other matter of concern is that is it possible to eliminate any UINavigationController and still get the same flow of the app? The main thing required is to have the SAME tab bar and navigation bar on all sub tabs of the tabs. One point to be noted is that if I remove the second UINavigationController then my app navigates directly from sub tab to home view controller on clicking back button.
I have been stuck on this since hours now. I am new to iOS app development and have never uploaded any app to the app store. Any help would greatly valued.
EDIT :
I put the second navigation controller as shown in the answers - see this flow, But because I have a navigation controller before the HomeViewController, so I am getting a navigation bar at the top and then some empty space below that(exactly equal to the top navigation bar) and then the page contents on runtime. Any solution to this?
Yes, it is acceptable by Apple.
But View hierarchy is not managed correctly. In your case Tab bar will be the root view controller for 2nd navigation controller.
Also, Tab and sub tab you are pushing will be part of 2nd navigation controller.
That's the reason you are getting back on Home view controller.
It's good practice to keep navigation controller to each Tab to manage it's sub-tab hierarchy.
You could present tab bar controller or setviewcontroller from Home View controller.
First embed tab bar controller as in this image and the embed navigation bar controller as in this image finally this will look like

Xcode simulator - Navigation bar is missing

I don't know why but my navigation bar is missing from my ios simulation.
Anybody know where might be the problem?
Yes I have "Shows Navigation bar" and I don't have any warnings.
I wanted to try "Update frames" but I don't have this option available.
I am using Xcode 7.3 and Swift.
Thank you
You can solve by embedding a navigation controller:
As other people have said in the comments without showing some code or screenshot of IB it's hard to find out where the problem is... But here's some things to checkout.
Are you sure your view controller is embedded in a UINavigationController?
If you are using Storyboards you should have something like this:
In code instead you might have set the window.rootViewController property in the AppDelegate to the content view controller rather than the navigation controller which is supposed to contain it.
Its depend how to embedding navigation controller but you can try to embedding navigation controller following below way and than run application and check in simulator : Go to Editor in xcode -> Embed in -> Navigation Controller.
I had the same problem: the navigation bar was showing on the root view in Storyboard, but when running the Simulator - there was no navigation bar at the top of the views. This solved it:
Navigation Controller > Navigation Bar > UNCHECK Translucent (it is checked by default). This did two things:
My Navigation Bar shows on all subsequent views.
The topmost subview on subsequent views is now at Y=0, and not Y=64.
There are two possibilities.
1) May be you didn't Embeded navigationcontroller before your viewcontroller. so, add Navigation controller with go to
Editor -> Embededin -> Navigation controller.
2) If you have add navigation controller but May be you have set NONE as topbar of Viewcontroller.

Weird nav controller behavior with different tab bar stacks

I have a tab bar controller with a nav bar embedded in each tab as root. I am using a detail view controller that will be accessed from 2 of these tab bar stacks. When accessing this view controller in it's own stack, everything works as expected. However, if the user is in the other tab and segues to this detail view controller, the view slips behind the navigation bar. Its like the nav bar isn't even there, it just goes underneath it. I've been scratching my head trying to figure out what's going on, any insights would be greatly appreciated!
Figured it out for those in a similar predicament. Need to add navigationController?.navigationBar.translucent = false in viewDidLoad. In iOS 7 this changed, by adding this line it won't slide the view beneath the nav bar.

Show Navigation Bar in Swift

I'm creating an App in swift. My first viewController (Login) shows perfectly with the action bar. But in others view controller i can't see the navigation bar. I was trying to embed all over controller in the navigationController,but it does not work. For example,i have other view controller with the name showlistas that have a search bar, when it loads, i see only the search bar, the navigation bar does;t appear. How can i solve it please?
Try making all the segues 'push' segues, it seems to make a difference to me.

Resources