Hello朋友 我添加了<代码>UIImageView和:BarButtonItem
,
Navigationbar
,载于rootViewController
,点击BarButten
。 主计长。 每一件工作都是罚款的,但一看一看一看一看一看二读。
nav = [[UINavigationController alloc] init];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, nav.navigationBar.frame.size.width, nav.navigationBar.frame.size.height)];
if(UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
UIImage *navImage = [UIImage imageNamed:@"NavBar-iPad.png"];
imageView.image = navImage;
}
else
{
UIImage *navImage = [UIImage imageNamed:@"NavBar-iPhone.png"];
imageView.image = navImage;
}
[nav.navigationBar addSubview:imageView];
[imageView release];
[nav pushViewController:viewController animated:YES];