1

So I have a UITabBarController that I'm able to tint the images of like so (I have an image that I use as the background):

#define TAB_BAR_TINT_COLOR [UIColor colorWithRed:128/255.0 green:128/255.0 blue:128/255.0 alpha:1.0]
#define TAB_BAR_SELECTED_TAB_COLOR [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0]

[self.tabBarController.tabBar setTintColor:TAB_BAR_TINT_COLOR];
[self.tabBarController.tabBar setSelectedImageTintColor:TAB_BAR_SELECTED_TAB_COLOR];

To produce this:

http://img35.imageshack.us/img35/9885/z6po.jpg

But I can't seem to do that with the Navigation Bar. Whenever I try to adjust any of the tints for the barButtonItem, it tints the background instead:

    UIBarButtonItem *refreshBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"02-redo.png"] style:UIBarButtonItemStylePlain target:self action:nil];

    [self.navigationItem setRightBarButtonItem:refreshBarButtonItem];
    [self.navigationItem.rightBarButtonItem setTintColor:[UIColor whiteColor]];

http://img580.imageshack.us/img580/1192/5gwf.jpg

Any help is greatly appreciated-- thanks!

gm0bbq
  • 31
  • 1
  • 3

1 Answers1

0

It should work. Where do you write this code? -(void)viewDidLoad; ??

Lightygalaxy
  • 121
  • 3