Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/113.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 xcode删除pickerview galley中的自定义导航图像_Ios_Objective C_Xcode - Fatal编程技术网

Ios xcode删除pickerview galley中的自定义导航图像

Ios xcode删除pickerview galley中的自定义导航图像,ios,objective-c,xcode,Ios,Objective C,Xcode,我在appDelegate中添加了以下代码,以实现导航栏的自定义背景图像 [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"Nav-Bar_01.png"] forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"Nav-Bar_0

我在appDelegate中添加了以下代码,以实现导航栏的自定义背景图像

    [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"Nav-Bar_01.png"] forBarMetrics:UIBarMetricsDefault];

    [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"Nav-Bar_02_alter.png"] forBarMetrics:UIBarMetricsDefaultPrompt];
但是,我想从这个背景中排除本机gallery pickerView


有没有办法不在每个导航栏上单独应用背景,但在appDelegate中保留相同的代码?

我最终为每个导航控制器放置了一个背景图像,而不是将其放置在appDelegate中。该背景随后未应用于pickerView

    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"Nav-Bar_01"] forBarMetrics:UIBarMetricsDefault];