I'd like to change the alpha of the UINavigationBar in my app without effecting its text and navbar elements.
I do the following in viewDidAppear of my initial view:
self.navigationController?.navigationBar.alpha = 0.5
However, that also changes alpha on text and navbar buttons.
I also tried the following with no luck:
self.navigationController?.navigationBar.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor().colorWithAlphaComponent(1)]
Is there a way to just affect the UINavigationBar background alpha?
One way to do it, is to change the alpha value of the background color when you set the color.
For example:
Of course you'd change the RGB values, to the color you want it to be.