旋转设备 iPhone 时隐藏 UITabBar
有人在旋转设备时成功隐藏了 UITabbar 吗?
我在 UItabbar 控制器中有一个视图可以旋转(因此有效地旋转一个选项卡)
当发生这种情况时,我希望选项卡栏消失......但似乎没有任何效果!
要么选项卡栏仍然可见
,要么随视图一起消失
,要么选项卡栏消失并且视图不再旋转!
因此,如果有人成功完成了这项任务,我们将不胜感激!
谢谢
汤姆
Has anyone successfully hidden a UITabbar when rotating the device?
I have one view in the UItabbar controller that i rotate (So effectively one tab that rotates)
When this happens i want the tab bar to disappear... but nothing seems to work!
Either the tabbar still remains visible
Or it disappears along with the view
Or the tabbar disappears and the view no longer rotates!
So if anyone has successfully accomplished this task any advice would be greatly appreciated!
Thanks
Tom
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
抱歉回复晚了,
我设法旋转并隐藏了标签栏。
首先是子类化 UITabBarController 的情况,并包含此方法:
然后您可以仅从所需的视图控制器进行旋转。
隐藏选项卡栏:
获取应用程序委托和选项卡栏控制器的引用,然后将选项卡栏设置为隐藏:
希望这有帮助!
Sorry for the late reply pk
I managed to rotate and hide the tab bar.
First it was a case of subclassing the UITabBarController, and including this method:
And then you can rotate from only the required view controllers.
To hide the tab bar:
Get reference to the app delegate and the Tab bar controller, and then set the tab bar to hidden:
Hope this helps!
您是否尝试在视图控制器中的 UIDeviceOrientationDidChangeNotification 通知上添加观察者,并在此回调上执行“Hidden = true 或 false”?
我使用 MonoTouch 框架通过以下 C# 代码成功完成了此任务。
Have you tried to add an observer on the UIDeviceOrientationDidChangeNotification notification in view controller, and do the "Hidden = true or false" on this callback?
I successfully accomplished this with the following C# code using the MonoTouch framework.
你真的可以隐藏 UItabbarController 中的标签栏吗?至少笔尖不允许您从底部栏下拉列表中选择任何一个。
can you actually hide the tabbar in the UItabbarController? Atleast the nib doesn't allow you to select none from the bottom bar dropdown.