Hi everybody!
I'm very new to xCode and iPhone devving, so excuse my noobism .
I'm attempting to use an image to cover the entire navigation bar. The issue is that since I'm using titleView (and navigationItem), it's having problems covering the entire area of the nav bar, scaling the width down from the original size for whatever reason (Fig 1). In the case where I have a navigation bar button, it scales even smaller to make room for the button (Fig 2).
Fig 1: http://img403.imageshack.us/img403/8626/fig1gb3.png
Fig 2: http://img413.imageshack.us/img413/3499/fig2pn3.png
I need the image to cover the entire area of the navigation bar, and somehow get it to go under the nav bar button. The nav bar is initiated inside a tableView controller. Here's my code so far:
Is there a better way to do this than using titleView, or can this be remedied somehow without resorting to alternative approaches?
I'm very new to xCode and iPhone devving, so excuse my noobism .
I'm attempting to use an image to cover the entire navigation bar. The issue is that since I'm using titleView (and navigationItem), it's having problems covering the entire area of the nav bar, scaling the width down from the original size for whatever reason (Fig 1). In the case where I have a navigation bar button, it scales even smaller to make room for the button (Fig 2).
Fig 1: http://img403.imageshack.us/img403/8626/fig1gb3.png
Fig 2: http://img413.imageshack.us/img413/3499/fig2pn3.png
I need the image to cover the entire area of the navigation bar, and somehow get it to go under the nav bar button. The nav bar is initiated inside a tableView controller. Here's my code so far:
Code:
UIImage *image = [UIImage imageNamed:@"navBar.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
imageView.frame = CGRectMake(0, 0, 320, 44);
self.navigationItem.titleView = imageView;
Is there a better way to do this than using titleView, or can this be remedied somehow without resorting to alternative approaches?