I'm developing a notes application and I want the colors of the notes to match the color of the Navigation Bar. When I set the color of the Navigation Bar, the color appears only when I scroll the screen. I want the color to show up without scrolling the screen.
Screenshot without scrolling
Screenshot with scrolling
I use a Xcode 14 and Swift 5
I tried navigationController?.navigationBar.barTintColor = UIColor.flatSkyBlue() AND navigationController?.navigationBar.backgroundColor = UIColor.flatSkyBlue() but it didn't work.
Thank you for help.


Try to configure your navBar like this, in viewDidLoad declare UINavigationBarAppearance and set navigation bar: