如何制作一个ipad app只有肖像? [英] How to make an ipad app only portrait?

查看:136
本文介绍了如何制作一个ipad app只有肖像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个ipad应用程序,我将应用程序设置为仅限肖像,但它仍可在横向上使用?为什么这只发生在ipad上?我如何解决这个问题?

I am making an ipad app, and i set the the app to only portrait, but it still works in landscape? Why is this happening only on an ipad? How do i fix this?

注意:如果答案是在代码中,请用swift编写。

Note: if the answer is in code, please write it in swift.

推荐答案

在xcode中选择你的项目。转到目标 - >常规,向下滚动,您可以选择方向仅为纵向。

In xcode select your project. Go to Targets -> General, scroll down and you can select the Orientation as portrait only.

您还可以更改info.plist文件以选择支持的正确方向界面方向(iPad)

You can also make change to info.plist file to select proper orientations for Supported interface orientations (iPad)

这篇关于如何制作一个ipad app只有肖像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆