swiftuinavigationbar

how to remove navigationbar blur effect - swift


i searched a lot on internet but did not find any solution for the problem, i don't want the navigation bar to be blur as in the screenshot enter image description here

the colour of navigation bar does not match with the other colour even i have used the sam hex value for both. i want to fix it. please help

this is the code i am using to colour navigation bar

 let navigationBarAppearace = UINavigationBar.appearance()
    navigationBarAppearace.tintColor = UIColor.white
    navigationBarAppearace.barTintColor = UIColor(red: 204/255.0, green: 51/255.0, blue: 51/255.0, alpha: 1.0)

Solution

  • What you see isn't actually blur effect, but translucent style of UINavigationBar. If you don't want translucent bar, set its isTranslucent property to false

    UINavigationBar.appearance().isTranslucent = false