I created a Tab Bar Controller, with 4 navigation controllers each containing one view controller, but on these view controllers, the bar titles are super low. It doesn’t matter if I choose large title or not, the issue is the same with regular titles.
Is it because of the tab bar?
Does someone knows how to fix it? When I set a custom frame for the navigation bar it doesn’t have any influence.
And when I push a new view controller, we can’t interact with anything that’s in the first 25% of the screen (probably because it’s behind the navigation bar title, even when i set it to none). That’s really weird, how do I set the titles higher or just disable them?
This is also what’s in my scene delegate :
let storyboard = UIStoryboard(name: "TabBar", bundle: nil).instantiateViewController(withIdentifier: "Main") as! UIViewController
let navigation = UINavigationController(rootViewController: storyboard)
window?.rootViewController = navigation
window?.makeKeyAndVisible()
The view controller with Identifier ‘Main’ is actually to tab bar at the top of the storyboard, so maybe there’s an issue with my scene delegate, but I don’t know why this could have an influence on the position of the navigation bar.
2
Answers
Check if you have selected Prefers Large Titles (If then uncheck it).
This code from your question:
So, you have:
Change your code to this (although it is very confusing object naming):
That said… why are you not setting that directly in your project setup? Why do this loading from code?