I want to change the colour of the toolbar to Black from the default blue. How do I do that 开发者_StackOverflow? Thanks.
You need to set the barStyle on the UINavigationBar to UIBarStyleBlack:
navigationController.navigationBar.barStyle = UIBarStyleBlack;
If you need to set it to some other color, you will need to set the tintColor property:
navigationController.navigationBar.tintColor = [UIColor blackColor];
You can read this question if you interested in the benefits of UIBarStyleBlack over a [UIColor blackColor] tintColor.
Use the below code. You can change the color of navigationbar what ever you want. Here I'm using brown , instead of this you can specify another color.
self.navigationController.navigationBar.tintColor = [UIColor brownColor];
I believe you're looking for setTintColor
精彩评论