Set background color for UINavigationBar

ios, navigationbar

Solution

[self.navigationController.navigationBar setBackgroundColor:[UIColor redColor]];

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

Edit: updated the code to actually compile.

Problem

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.

Original source