在基于导航的应用程序 iPhone 中的选定视图中隐藏导航栏
我正在开发应用程序,我已经制作了基于应用程序导航的应用程序。我只想从选定的视图中隐藏导航栏,我该怎么做? 我使用了以下代码,但它隐藏了整个应用程序的栏 self.navController.navigationBarHidden = YES;
如果有什么办法请告诉我..
提前致谢
I am working on application, I had made application navigationbased. I want to hide navigation bar from the selected view only how can i do that?
i used following code but it hides the bar from whole application
self.navController.navigationBarHidden = YES;
If there is any way please let me know..
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
在 selectedView 中,当主视图 didLoad 时隐藏导航控制器,并在视图消失时取消隐藏,
例如:- 在 selectedView.m 中
,
现在通过执行此操作,您将不会在 selectedView 中获得导航控制器,但会在其他视图中获得导航控制器...更多相关信息尝试从已经询问过的如何在不使用导航控制器的情况下工作获得帮助
希望这可以帮助你......祝你好运!
In the selectedView hide the navigation controller when main view didLoad and unhide that when view will dissappear
eg:- In selectedView.m
and
now by doing this u will not get navigation controller in selectedView but get that in other views...For more corcern try to take help from already asked how to work without with navigation controller
Hope this may help u....Good luck!!!
在您想要导航控制器的视图上,
使用它
在 viewWillAppear和
同一视图的 viewWillDisappear 方法中
on view which you want navigation controller use
this in viewWillAppear
And
in viewWillDisappear method of same view
尝试使用此代码,
self.navigationController.navigationBar.hidden=YES;
祝你好运
Try with this code,
self.navigationController.navigationBar.hidden=YES;
Good Luck
您必须在要隐藏导航栏的控制器中编写以下代码...
self.navigationController.navigationBar.hidden=YES;
你必须编写下面的代码来显示导航栏...
self.navigationController.navigationBar.hidden=NO;
在各自的 viewWillAppear 中编写这两个代码...
You have to write below code in that controller in which you want to hide your Navigation bar...
self.navigationController.navigationBar.hidden=YES;
and you have to write below code in which you want to show Navigation bar...
self.navigationController.navigationBar.hidden=NO;
write both code in respective viewWillAppear ...