0
votes

I am creating a title view in my navigation bar. I designed my title view with background view color R:255 G:182 B:22 (on photoshop). In my storyboard, I've set the navigation bar tint color with the same RGB code, default style and translucent checked.

I put my image on my navigation title using:

UIImage *titleImage = [UIImage imageNamed:@"Icon-Small-40.png"];
self.navigationItem.titleView = [[UIImageView alloc]initWithImage:titleImage];

When I run the app, you can clearly see a square icon in the title view. The title view has a slightly darker background. I want to make the background the same color. I get the feeling that it has something to do with some storyboard setting but I can't find the issue.

3
Could you please share print screen of what you get ?Jageen

3 Answers

0
votes

the view has a tintColor property, so

self.navigationItem.titleView.tintColor = ...

0
votes

Below answer for your navigation bar tint color

self.navigationController.navigationBar.tintColor = [UIColor greenColor];
0
votes

Trying to make colours match up like this can be maddening. Colour space problems aside, the actual colour of the navigation bar isn’t guaranteed by the API to be the same as its barTintColor. You might find it easier to give the title image a transparent background.