Is there any way I can set the background of the Navigation Bar of the UINavigationController
to a solid color?
I know I can change the Tint color, but that still leaves me with the gradient/glass effect.
Any way I can get rid of that, and just have a plain old solid color?
How to change navigation bar color in Bootstrap ? A custom class can be created to specify the background color and the text color of the navbar. This class is styled using CSS according to the required values. The names of the classes are kept in a manner to override the inbuilt navigation bar classes.
Go to attribute inspector of for Navigation bar and remove check mark from translucent.
To fix this, head into General Settings –> Color of Navigation Bar when Keyboard is opened. Set this color to black as well. This should fix any issues you may have when the keyboard is open. Note that there is also an option to enable coloring of the keyboard simultaneously.
The following code also results in solid color of navigation bar:
[[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
[[UINavigationBar appearance] setBackgroundColor:[UIColor redColor]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With