I'm trying to set a faded darker background to a navigation bar, as you can see on the image below.
I've tried with this code but it's not exactly what I expect.
UINavigationBar.appearance().backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.4)
I've found this topic, but without suitable answer:
Shows a faded gray color view through iOS 7 Navigation bar of a UISplitViewController
Any idea will be appreciated.
EDIT 6 oct 2015 : If somebody needs to know how to perform that
For Swift users : - in particular viewcontroller : i use :
self.navigationController!.navigationBar.setBackgroundImage(UIImage(named: "fadedimage.png"), forBarMetrics: .Default)
in the main NavigationController (to apply that to the all navigationBar) i use :
UINavigationBar.appearance().setBackgroundImage(UIImage(named: "fadedimage.png"), forBarMetrics: .Default)