I looked through all the typical training topics and questions for tintcolor navigation bars. I have a set of shades for the navigation bar, but I have a mail icon that needs to be changed to its own color when there is mail. (e.g. reddish orange mail icon)
I can adjust the hue correctly only when using system UIColors.
self.leftNavigationBarButton = [[UIBarButtonItem alloc] initWithImage:someImage style:UIBarButtonItemStylePlain target:self action:@selector(foo:)];
self.navigationItem.leftBarButtonItem = self.leftNavigationBarButton;
self.leftNavigationBarButton.tintcolor = [UIColor redColor];
However, if I use custom color.
self.leftNavigationBarButton.tintcolor = [UIColor colorWithRed:100 green:40 blue:20 alpha:1.0];
He makes the icon white. Does anyone know what is happening or how can I use custom color?
source
share