新加载视图中的导航控制器

发布于 2024-12-10 09:53:28 字数 240 浏览 0 评论 0原文

我花了大约一个小时试图解决这个问题,但似乎找不到答案。所以基本上我的应用程序启动,并加载一个新视图,这个视图有一个 tabeview,我了解表视图,但不太了解导航控制器。

我希望这个导航控制器只加载这个新视图,我不需要在整个新应用程序中使用它。

我知道您可以使用应用程序委托,但我仍然很困惑这是否适合我想要完成的任务。

如果有人可以向我展示一篇有关此问题的文章或只是给我一些代码,那就太棒了。

非常感谢

I have been trying to figure this out for about a hour and can't seem to find the answer. So basically my app starts, and loads a new view, this view has a tabeview, i understand tableviews, but not navigation controllers as much.

I want this navigation controller to only be loaded with this new view, I don't need it throughout the new app.

I know you can use the app delegate, but I'm still confused if this would work with what I'm trying to accomplish.

If someone could either show me an article about this or just give me some code, that would be amazing.

Thanks very much

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

蓝戈者 2024-12-17 09:53:28

您可以使用导航控制器作为应用程序的根视图控制器,并将其导航栏隐藏在不需要它的视图中。

[self.navigationController setNavigationBarHidden:YES animated:YES];

要再次显示它,只需调用相同的方法并将第一个参数设置为 NO 即可。

You can use navigation controller as the root view controller of your app and hide its navigation bar inside views that don't need it.

[self.navigationController setNavigationBarHidden:YES animated:YES];

To show it again, just call the same method with first parameter set to NO.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文