Button color in Navigation bar - iPhone

Posted by Mladen on Stack Overflow See other posts from Stack Overflow or by Mladen
Published on 2009-08-27T12:05:00Z Indexed on 2010/06/03 4:34 UTC
Read the original article Hit count: 354

Filed under:
|

Hi guys,

How to set this yellow button to be gray tinted one. I have tried adding image, but no luck Here is the screenshot:

alt text

Here is my current code:

  • (id)initWithStyle:(UITableViewStyle)style { if (self = [super initWithStyle:style]) {

    UIBarButtonItem *addButton = [[UIBarButtonItem alloc]
    							  initWithTitle:NSLocalizedString(@"Settings", @"")
    							  style:UIBarButtonItemStyleDone
    							  target:self
    							  action:@selector(GoToSettings)];
    [addButton setImage:[[UIImage imageNamed:@"bg_table.png"] retain]];
    
    
    self.navigationItem.rightBarButtonItem = addButton;
    self.navigationItem.hidesBackButton = TRUE;
    self.view.backgroundColor = [UIColor blackColor];
    

    } return self; }

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uinavigationbar