隐藏选项卡栏应用程序中的选项卡栏

发布于 2024-09-10 03:26:01 字数 265 浏览 3 评论 0原文

我从模板创建了一个新项目:

IPhoneOS>Application>Tab Bar Application。

我得到两个标签。

如何使第二个成为全屏隐藏选项卡栏甚至状态栏?

我尝试检查“想要全屏” - 但没有帮助。

(不太重要......当我确实获得全屏时,我会回来吗?)

请给我一个简单的代码/指南或对它们的引用,因为我是初学者 - 我和编译器有太多问题使事情变得更糟

谢谢 阿萨夫

I have created a new project from the template:

IPhoneOS>Application>Tab Bar Application.

I get two tabs.

How can I make the second become a full screen hiding the tab bar and even the status bar?

I tried to check the "Wants Full screen" - but it didn't help.

(Much less important... When I do get a full screen I do I get back?)

Please give me a simple code/guidelines or a reference to them, cause I'm a beginner - and Me and the compiler got too many issues to make things worse

Thanks
Asaf

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

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

发布评论

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

评论(4

永不分离 2024-09-17 03:26:01

要隐藏标签栏,您可以使用hidesBottomBarWhenPushed。例如:

MyController *myController = [[MyController alloc]init]; 
myController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:myController animated:YES];
[myController release];

要隐藏状态栏,您可以使用:

[[UIApplication sharedApplication] setStatusBarHidden:YES];

要隐藏导航栏,您可以使用:

self.navigationController.navigationBarHidden = YES;

To hide the tab bar you can use hidesBottomBarWhenPushed. For instance:

MyController *myController = [[MyController alloc]init]; 
myController.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:myController animated:YES];
[myController release];

To hide the status bar you can use:

[[UIApplication sharedApplication] setStatusBarHidden:YES];

To hide the nav bar you can use:

self.navigationController.navigationBarHidden = YES;
歌枕肩 2024-09-17 03:26:01

你可以只使用:

//Navigation bar:
self.navigationController.navigationBarHidden = YES;

//Statusbar:
[[UIApplication sharedApplication] setStatusBarHidden:YES];

//Tabbar:
self.tabBarController.tabBar.hidden = YES;

You can just use:

//Navigation bar:
self.navigationController.navigationBarHidden = YES;

//Statusbar:
[[UIApplication sharedApplication] setStatusBarHidden:YES];

//Tabbar:
self.tabBarController.tabBar.hidden = YES;
夢归不見 2024-09-17 03:26:01

你检查过模态视图控制器吗?

http://developer.apple.com/iphone/library/ featurearticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html

尝试在navigationController上使用presentModalViewController:animated:方法(而不是推送视图控制器)

[self.navigationController presentModalViewController:foo animated:YES];

Have you checked Modal View Controllers out?

http://developer.apple.com/iphone/library/featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html

Try the presentModalViewController:animated: method on your navigationController (instead of pushing a view controller)

[self.navigationController presentModalViewController:foo animated:YES];
¢蛋碎的人ぎ生 2024-09-17 03:26:01

实现此目的的另一种方法是使 UITabBarController 成为 UINavigationController 的 rootViewController。然后,当您按下ViewControllerAnimated:时,选项卡栏将与根视图控制器一起滑走。

Another way to accomplish this is by making the UITabBarController the rootViewController of a UINavigationController. Then when you pushViewControllerAnimated: the tab bar will slide away with the root view controller.

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