Reputation: 11
I'm trying to develop an app that has a navigation controller at the top. When viewing the app on the storyboard as an iPhone 7 Plus, the status bar is visible, and the layout is correct. When viewing as any other device, the status bar is missing, and the layout is off by 20px. I also get a "misplaced view" warning.
I believe this has to do with the issue working while developing on my work computer, but then when I switch to my laptop, the Misplaced View errors start happening.
When running the app, the app works fine and looks as it should regardless of the device, but with everything off like this, it's hard to develop.
Did I change some default setting on my laptop to not show the status bar on some views in the storyboard view? Thanks for any help!
Update: At work (different Mac running Xcode with the same project files, the status bar shows on every preview (meaning no misplaced views). It's got to be something with my Xcode settings at home. Any ideas?
Upvotes: 0
Views: 9008
Reputation: 11
Uninstalling and reinstalling Xcode on the mac with the issue seemed to solve the problem. I'm sure it's a bug.
Upvotes: 1
Reputation: 5186
You need to change the value of "Status Bar" value and its visible into storyboard.
Upvotes: 1
Reputation: 969
you can do it as
override var prefersStatusBarHidden: Bool {
return false
}
Upvotes: 0
Reputation: 685
This is nit the issue with your VC but is with NavigationController, so select your NavigationVC and check mark the option underTopBars,
Upvotes: 0