更改 UITabBar 中的方向
我有一个带有很多视图控制器和导航控制器的 UITabBar。我正在尝试支持两个方向,但仅限纵向工作。我知道我必须在所有视图控制器中重写此方法并返回 YES,我确实这样做了:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
但它仍然不起作用。可能出了什么问题?
I have a UITabBar with a lot of view controllers and navigation controller. I am trying to support both orientations but only portrait works. I know that I have to override this method in all view controllers and return YES and I did like this:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return YES;
}
but it still doesn't work. What could possibly be wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保:
方向。
控制器也支持它。
Be sure:
orientations.
controllers support it as well.