Background image for navigation view (iPhone)

Posted by Mladen on Stack Overflow See other posts from Stack Overflow or by Mladen
Published on 2009-06-11T07:19:14Z Indexed on 2010/03/19 23:41 UTC
Read the original article Hit count: 254

Filed under:
|

Hi Guys, I am having problems with properly displaying background image of navigation view. Here is the pic:

alt text

Here is the code:

  • (id)initWithStyle:(UITableViewStyle)style { if (self = [super initWithStyle:style]) {

    UIImage *image = [UIImage imageNamed: @"bg_table_active.png"];
    UIImageView *imageview = [[UIImageView alloc] initWithImage: image];
    UIBarButtonItem *addButton = [[UIBarButtonItem alloc]
    							   initWithTitle:NSLocalizedString(@"Settings", @"")
    							   style:UIBarButtonItemStyleDone
    							   target:self
    							   action:@selector(GoToSettings)];
    self.navigationItem.titleView = imageview;
    self.navigationItem.rightBarButtonItem = addButton;
    self.navigationItem.hidesBackButton = TRUE;
    

    } return self; }

How to make the picture stretch to whole navigation view?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uinavigationbar