SwiftUI: NavigationView Background Color – Extending into Safe Area

When trying to change the background color of my navigationView, I would change the background color of the UINavgiationBarAppearence in the App Delegate. But the issue with that solution is it would leave a white bar at the top of the screen on the safe area.

iPhone – Before

This looks okay, but the white bar at the top just does not look right. The solution for this is the following.

iPhone – After

This looks MUCH better. I hope this helps!

Leave a Reply

Your email address will not be published. Required fields are marked *