views:

19

answers:

0

Hi,

How do I change the color of the back button in iPhone?

I have already tried something like this, but it does not work:

    UIView *customView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 49.0, 30.0)];
customView.backgroundColor=[UIColor blueColor];

UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithCustomView:customView];

self.navigationItem.backBarButtonItem = button;

The code is in the -viewDidLoad of my ParentView and I want to change the color of the back button in my Child View.

thanks