Andoni Da Silva
Andoni Da Silva

Reputation: 1341

iOS14 navigation bar being ignored by viewController inner View which is overlapping it

I have a UINavigationController with some UIViewControllers embed. The problem is when I start to push viewControllers. As you can see in the next image, the content view of the current viewController is overlapping the navigationBar:

enter image description here

enter image description here

In viewDidLoad:

 func setupFront() {
        navigationController?.setNavigationBarHidden(false, animated: true)
        self.navigationController?.navigationBar.prefersLargeTitles = true
        title = NSLocalizedString("customer_settings_profile_title", comment: "")
        binding()
        setupLanguage()
    }

Upvotes: 0

Views: 129

Answers (1)

Andoni Da Silva
Andoni Da Silva

Reputation: 1341

The problem was the autolayout. The top constraints of the views that I push weren't set to safe area.

Now it is and it works:

enter image description here

Upvotes: -1

Related Questions