0

In my app, I have custom navigation bars using images. I load them up in viewWillAppear like so:

-(void)viewWillAppear:(BOOL)animated {
    UIImage *gradientImage46 = [[UIImage imageNamed:@"navbar2.png"]resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 0, 0)];
    [self.navigationController.navigationBar setBackgroundImage:gradientImage46 forBarMetrics:UIBarMetricsDefault];
    [super viewWillAppear:animated];

}

On iOS 7, this is fine, but I just noticed on 6.1, the bar is much too large and looks like this: enter image description here

Thoughts as to what's happening?

user717452
  • 33
  • 14
  • 73
  • 149
  • 1
    what are the dimensions of the image? – Ilario Dec 18 '13 at 14:11
  • 1
    may be you need to resize the image with nav bar width. and its best to call super on the first line. – karim Dec 18 '13 at 14:15
  • Wow...must have forgot to resize the image before I put it in there...it was way too big. The size is now fixed, but I just noticed it is covering up the back buttons – user717452 Dec 18 '13 at 14:28

0 Answers0