I am new to iOS development, facing a strange problem. In viewDidLoad
I wrote 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 works fine and changed the background color on the navigation bar, the problem at the top of the navigation bar shows a white bar showing (with Carrier, Battery, time), I want the background color to also change ... so I tried the code below
[[UINavigationBar appearance] setBackgroundColor:[UIColor colorWithRed:189.0/255.0 green:105.0/255 blue:105.0/255 alpha:1.0]];
But nothing has changed, it shows the same white background color, I would like to know what is the mistake I'm making
source share