UITabBarController 和模态视图自动旋转的问题
我在打开和关闭 ModalView 时遇到问题:当用户触摸按钮打开视图或触摸按钮关闭视图时,控制台中会出现此消息:
视图控制器从 _shouldAutorotateToInterfaceOrientation 返回 NO:对于所有界面方向。它应该支持至少一种方向。
ModalView 与 UITableViewController 关联,包含在 UINavigationController 中,然后插入到 UITabBarController 中。我不明白如何解决这个问题。
I have a problem opening and closing of a ModalView: when the user touches the button to open the view, or when it touches the button to close it, appears this message in Console:
The view controller returned NO from _shouldAutorotateToInterfaceOrientation: for all interface orientations. It should support at least one orientation.
The ModalView is associated with a UITableViewController, contained in a UINavigationController in turn inserted into a UITabBarController. I can not understand how to solve this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,这现在已经很老了,但以防万一它对某人有帮助:你的代码可能看起来像这样:
问题在于你本质上是在说你的视图不支持任何方向:)
它应该看起来像这样:
Trivial但这也许对将来的人有帮助。
Well this is very old now, but just in case it helps someone: your code probably looks like this:
The problem there is that you are essentially saying that your view won't support ANY orientation :)
It should look something like this:
Trivial but maybe this helps someone in future.