I want to change my table view navigation bar background image to some png, i created the nav bar png with the exact sizes of a default nav bar (I checked in interface builder).
This is my code (in my table view controller class, viewDidLoad method):
once i tried this one:
UIImageView *backImgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nav.png"]];
[self.navigationController.navigationBar addSubview:backImgView];
Shouldn't this work..?
and the other was this one:
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"nav.png"] forBarMetrics:UIBarMetricsDefault];
both were from people here in stack overflow trying to help me solve this.
this is my table view settings in the interface builder if this help:
the top one is what i suppose to get and the bottom one is what im getting:
thanks!