iPad 的横向方向?
我对这应该如此简单感到沮丧...
我正在尝试为我现有的 iPad 应用程序添加横向支持。我真的必须为横向模式创建一个全新的视图控制器吗? (当然不是,因为那完全是痛苦!)?或者我可以使用现有的视图控制器和横向和纵向设计吗?模拟指标不起作用,因为每当我在横向模式下对视图控制器进行更改并切换回纵向时,一切都会变得混乱!我知道如何以编程方式将视图切换到横向,这是(至少我认为)“界面生成器”之类的问题。
为什么这这么难做/很难找到!?可能值得一提的是,我使用带有故事板的 Xcode 4.2,而不是单独的 xib。当然,我不必使用单独的视图和继续,因为我真的不愿意浪费时间。
任何帮助都会很好!谢谢
Frustrated by how simple this should be...
I'm trying to add landscape support to an existing iPad app of mine. Do I actually have to create a completely new view controller for landscape mode? (surely not as that is a complete pain!)? Or can I use the existing view controllers and design for landscape and portrait? The simulated metrics thing doesn't work because whenever I make changes in a view controller in landscape mode and switch back to portrait it messes everything up! I know how to switch the view to landscape programmatically, this is (at least i think) an 'interface builder' sort of issue.
Why is this so difficult to do/hard to find!? Might be worth mentioning I'm using Xcode 4.2 with storyboards rather than separate xibs. Surely I don't have to use a separate view and segues because I really can't be bothered wasting my time with that.
Any help would be nice! Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
观察 -willRotateToInterfaceOrientation:duration: 并在旋转发生变化时更改界面元素的框架。
Watch for -willRotateToInterfaceOrientation:duration: and change the frame of your interface elements when the rotation changes.