I'm trying to change the back button to a custom one. If I create a UIBarButtonItem with just a custom title, that works fine. However if I create one with a custom view, the button doesn't show, rather the default back button shows. Any ideas ?
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom]; backBtn.frame = CGRectMake(0, 0, 51, 31); [backBtn setImage:[UIImage imageNamed:@"nav_btn_back.png"] forState:UIControlStateNormal]; [backBtn addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *back = [[[UIBarButtonItem alloc] initWithCustomView:backBtn] autorelease]; self.navigationItem.backBarButtonItem = back;