I want to develop UINavigationBar and also set background color for that. I have created the UINavigationBar but I have problem with setting backgr
self.navigationController.navigationBar.tintColor = [UIColor blackColor];
Try this:
navigationBar.tintColor = [UIColor blackColor];
You can customize a UINavigationBar with the following propertys:
@property(nonatomic, assign) UIBarStyle barStyle@property(nonatomic, retain) UIColor *tintColorsetBackgroundImage:forBarMetrics:@property(nonatomic, copy) UIColor *backgroundColor For more methods and propertys please check the class reference of UINavigationBar and UIView
In the new iOs this it how it works:
self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
self.navigationController.navigationBar.barTintColor =[UIColor colorAzulNavegacion];
You could use the tint property of the UINavigationBarto change it's color. Check this article about it. There is also UIAppearance, that allows you to change the background of every UINavigationBar of your application, which is quite powerfull in my opinion. You can check this.
You can set the tint color by using navbar.tintColor = [UIColor redColor];
See the reference here: apple docs