Set background color for UINavigationBar

Sugan S picture Sugan S · Jun 20, 2012 · Viewed 18.2k times · Source

I want to develop UINavigationBar and also set background color for that. I have created the UINavigationBar but I have problem with setting backgroundcolor. anyone please help me. Thanks.

Answer

Prasad G picture Prasad G · Jun 20, 2012
[self.navigationController.navigationBar setBackgroundColor:[UIColor redColor]];

Try like this. I think it will be helpful to you.

Edit: updated the code to actually compile.