Search code examples
swiftuikituinavigationcontroller

Why my navigation controller has like a margin


(https://i.sstatic.net/CSyxU.png) Im creating this view programmatically and is taking a lot of space between the navigation bar and safe area I suppose, is there any way to place this without any margin?

I have tried to hide the nav, but I need to show the title of the view


Solution

  • I've seen this before. Im betting you have your tabBarController in a UINavigationController and also your viewControllers in a NavigationController, giving you the extra top padding. In a nutShell remove one of the navigationController.