I am new to iOS development, I facing a strange problem. In viewDidLoad
I had written a code like this
self.navigationController.navigationBar.backgroundColor= [UIColor colorWithRed:189.0/255.0 green:105.0/255 blue:105.0/255 alpha:1.0];
this is working fine and changed the navigation bar background color, the problem is in the top of the navigation bar there is white bar showing (that has Carrier, Battery, time), I want that background color also changed... so I tried the below code
[[UINavigationBar appearance] setBackgroundColor:[UIColor colorWithRed:189.0/255.0 green:105.0/255 blue:105.0/255 alpha:1.0]];
But nothing changed, it is showing same white background color, I would like to know whats the mistake I am doing
Try this,
[[UINavigationBar appearance] setBarTintColor:[UIColor yellowColor]];
or
self.navigationController.navigationBar.barTintColor = [UIColor blueColor];
self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
self.navigationController.navigationBar.translucent = NO;
and
[self.navigationController.navigationBar setBarStyle:UIStatusBarStyleLightContent];
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