For Customing navigation bar, I want set the background image and custom the left button and right button.so I instance it with code without .xib. but there is a white space bar above navigation bar.
here is my code :
-(void) createNavBar:(NSMutableArray *)arguments withDict:(NSMutableDictionary *)options
{
if (!navBar)
{
navBarController = [[[UINavigationController alloc] init] autorelease];
navBarController.navigationBar.bounds = CGRectMake(0, 0, 320, 40);
[navBarController.navigationBar setBackgroundImage:[UIImage imageNamed:@"www/images/header_bg@2x.png"] forBarMetrics:UIBarMetricsDefault];
[[[self webView] superview] addSubview: navBarController.navigationBar];
}
}
run and build, find there is a white space bar above navigation bar.
here is a Screenshot:
How can remove the space bar between the title bar and the blue navigation bar? Thanks for your guide.