how to remove navigationbar blur effect - swift

Viewed 2783

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)
3 Answers

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

Use:

navigationController.navigationBar.isTranslucent = false

You can disable this blur effect by using both standard and scroll edge

By Setting

       **Standard Appearance 
                background-color**
                This setting will Work to hide the blur effect on a scroll and also to set title style on scroll

       **Scroll Edge Appearance
                background-color**

                Appearance without scroll-like background color, title, etc.

Other Settings are remained the same like Translucent: true etc

enter image description here

Related