Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.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
Iphone 需要在基于选项卡栏导航的应用程序中隐藏底部栏_Iphone_Ios_Tabbar_Viewcontroller_Navigationbar - Fatal编程技术网

Iphone 需要在基于选项卡栏导航的应用程序中隐藏底部栏

Iphone 需要在基于选项卡栏导航的应用程序中隐藏底部栏,iphone,ios,tabbar,viewcontroller,navigationbar,Iphone,Ios,Tabbar,Viewcontroller,Navigationbar,我在基于Tabbar导航的应用程序中遇到问题。我有一个带有3个选项卡栏按钮项的选项卡栏 每个选项卡栏项,我都需要显示导航控制器的视图。当我单击第一个按钮时,我需要显示导航控制器的根视图 当导航控制器的视图被按下时,我需要它,然后在一个视图中我需要显示选项卡栏。当按下第二个视图时,我需要隐藏选项卡栏。当按下第三个视图时,我需要再次显示选项卡栏。当视图弹出时,它也应该工作 在导航控制器的根视图(主视图)中,我需要显示底部的选项卡栏。但是一个新视图(第一个视图)被按下,然后我需要隐藏选项卡栏。然后我将

我在基于Tabbar导航的应用程序中遇到问题。我有一个带有3个选项卡栏按钮项的选项卡栏

每个选项卡栏项,我都需要显示导航控制器的视图。当我单击第一个按钮时,我需要显示导航控制器的根视图

当导航控制器的视图被按下时,我需要它,然后在一个视图中我需要显示选项卡栏。当按下第二个视图时,我需要隐藏选项卡栏。当按下第三个视图时,我需要再次显示选项卡栏。当视图弹出时,它也应该工作

在导航控制器的根视图(主视图)中,我需要显示底部的选项卡栏。但是一个新视图(第一个视图)被按下,然后我需要隐藏选项卡栏。然后我将属性
hidesbottombarwhenpush
设置为YES

FirstViewController *firstController = [[FirstViewController alloc]initWithNibName:@"FirstViewController" bundle:nil];
firstController. hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:firstController animated:YES];
它在第一个视图中运行良好

但问题是,当我推送一个新视图(第二个视图)时,即使我设置了属性,选项卡栏也不会显示:

SecondViewController *secondController = [[SecondViewController alloc]initWithNibName:@"SecondViewController" bundle:nil];
secondController. hidesBottomBarWhenPushed = NO;
[self.navigationController secondController animated:YES];

让我知道这是否有效

FirstViewController *firstController = [[FirstViewController alloc]initWithNibName:@"FirstViewController" bundle:nil];
//firstController. hidesBottomBarWhenPushed = YES;
[self.navigationController presentViewController:firstController animated:YES];

这是正确的吗<代码>[self.navigationController pushViewController:selImageList动画:是]不应该是
firstController
而不是
selImageList
?请参见我的回答:不,它不起作用。当显示第一个视图时,会显示COZ选项卡栏。我需要隐藏第一个视图的选项卡栏。