Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何更改UINavigationBar';通过XCode 6中的界面生成器创建背景图像_Ios_Xcode_Interface Builder_Xcode6_Uinavigationbar - Fatal编程技术网

Ios 如何更改UINavigationBar';通过XCode 6中的界面生成器创建背景图像

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

如何通过XCode 6中的Interface Builder更改所有使用此
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;
        }