I canโt set the full image in the navigation bar (or the navigation controller at the top of the application). there will be little space on the left side. And when I put the info button, it is not in the image. How to fix it?
here is my code pls look
UIImageView* img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"headerBG.png"]]; img.frame = CGRectMake(0, 0, 320, 44); self.navigationItem.titleView =img; [img release]; UIButton * infoDarkButtonType = [[UIButton buttonWithType:UIButtonTypeInfoLight] retain]; infoDarkButtonType.frame = CGRectMake(0.0, 0.0, 25.0, 25.0); infoDarkButtonType.backgroundColor = [UIColor clearColor]; [infoDarkButtonType addTarget:self action:@selector(showInfo) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *infoButton = [[UIBarButtonItem alloc] initWithCustomView:infoDarkButtonType]; self.navigationItem.leftBarButtonItem = infoButton; [infoDarkButtonType release]; [infoButton release];
thank you very much.
Me.
source share