Ios 如何更改UINavigationBar';通过XCode 6中的界面生成器创建背景图像
如何通过XCode 6中的Interface Builder更改所有使用此Ios 如何更改UINavigationBar';通过XCode 6中的界面生成器创建背景图像,ios,xcode,interface-builder,xcode6,uinavigationbar,Ios,Xcode,Interface Builder,Xcode6,Uinavigationbar,如何通过XCode 6中的Interface Builder更改所有使用此UINavigationController的视图控制器的UINavigationBar背景图像?不幸的是,更改“Back Image”选项的值不会更改背景图像 提前感谢。[[UINavigationBar外观]setBackgroundImage:[UIImage ImageName:@“nav_bg.png”]forBarMetrics:UIBarMetricsDefault];将此行添加到app delegate d
UINavigationController
的视图控制器的UINavigationBar
背景图像?不幸的是,更改“Back Image”选项的值不会更改背景图像
提前感谢。[[UINavigationBar外观]setBackgroundImage:[UIImage ImageName:@“nav_bg.png”]forBarMetrics:UIBarMetricsDefault];将此行添加到app delegate didFinishLaunchingWithOptions中method@adnan我可以通过Interface Builder进行更改吗?Interface Builder只有背面图像选项。那对你来说永远不管用。实际上,我们必须设置导航栏的标题视图图像。我不确定我们是否可以在interface builder中更改它。这条线行fine@adnan是否为应用程序中的所有导航控制器栏设置背景图像?是否为所有导航控制器栏设置背景图像
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UIImage *navBackgroundImage = [UIImage imageNamed:@"navbar_bg"];
[[UINavigationBar appearance] setBackgroundImage:navBackgroundImage forBarMetrics:UIBarMetricsDefault];
return YES;
}