管理情节提要中的自动旋转
我正在开发一个具有多个故事板场景的应用程序。 我想支持设备的任何旋转。
当我开始时,第一个场景自动旋转工作正常。问题似乎是当我添加更多场景并通过转场连接它们时。比如说,您单击菜单按钮并转到另一个场景...下一个场景以纵向模式弹出并且不会自动旋转...
我应该使用导航控制器来调出视图并旋转它...或者我没有使用正确的segue吗?
I'm working on an app that has several storyboard scenes.
I'd like to support any rotation of the device.
When I start, the first scene auto-rotataion works fine. The problem seems to be when I add more scenes and connect them via segues. Say, you click a menu button and segue to another scene... that next scene pops up in portrait mode and doesn't auto rotate...
Should I use a navigation controller to bring up the view and rotate it... Or am I not using the correct segue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所有场景可能需要也可能不需要有自己的子类(取决于继承)。将子类分配给相应的场景。
然后,您需要在子类中设置支持的旋转值。例如。:
All you scenes may or may not need to have their own subclass (depending on inheritance). Assign the subclass to the respective scene.
You then need to set the supported rotation values in the subclass. eg.: