iPhone - 仅横向应用程序
我正在尝试制作一个只能在横向模式下查看的应用程序。我查阅了一些教程(尽管是较旧的教程)并完成了以下操作:
-设置 info.plist 以包含 uiinterfaceorientation 的键
- 在主视图控制器中,我已将框架设置为 480 x 320
现在,第一个屏幕加载正常。一切都在它应该在的地方。但是,如果我单击设置为呈现模式视图控制器的按钮,则不会发生任何情况。一切都已正确链接和编码,但当我按下按钮时什么也没有发生。我试图强制景观做错了什么吗?
从根本上来说,这个问题是如何有效地制作一个仅在横向模式下的应用程序?感谢您的任何帮助。
I am trying to make an app that will only be viewed in Landscape. I have looked up some tutorials (albeit older ones) and have done the following:
-set up the info.plist to include a key for uiinterfaceorientation
-in the main view controller I have set the frame to be 480 x 320
Now, the first screen loads up ok. Everything is where it should be and whatnot. However, if I click a button that is set to present a modal view controller nothing happens. Everything is linked and coded correctly but nothing happens when I press the button. Am I doing something wrong with trying to force landscape?
At it's basic, this question is a how do you effectively make an app that will only be in landscape mode? Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该只取消注释我在下面向您展示的这个方法:
You should only uncomment this method I show you below: