适用于iPhone的纵向打印和iPad横向打印的通用应用程序 [英] Universal application with Portrait orientation for iPhone and Landscape orientation for iPad

查看:839
本文介绍了适用于iPhone的纵向打印和iPad横向打印的通用应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Swift创建一个Universal应用程序。我使用了Storyboard和Auto-Layouts。要求是创建一个通用的应用程序,它只支持iPhone的纵向方向和iPad的横向方向。



我已经为iPhone开发了UI,现在我将启动iPad UI。



此外,为iPhone创建的UI与为iPad创建的UI不同,两个UI都截然不同。



<我正在考虑为iPhone和iPad创建单独的故事板。有没有正确的方法来实现这个目标?

解决方案

转到info.plist文件并添加一个带有键的数组支持的界面方向(iPhone)并在其中添加以下值:


  1. 人像(底部主页按钮)

同样,添加另一个数组支持的界面方向(iPad)并添加以下内容:


  1. 人像(底部主页按钮)

  2. 风景(左主页按钮)

  3. 风景(右主页按钮)

见下文:


I'm creating a Universal application using Swift. I have used Storyboard and Auto-Layouts. Requirement is of creating a universal application which will support Portrait orientation only for iPhone and Landscape orientation only for iPad.

I have developed UI for iPhone and now I will be starting iPad UI.

Also UI created for iPhone is not same as UI created for iPad, both UI's are quite different.

I'm thinking of to create separate storyboards for iPhone and iPad. Is there any proper way to achieve this?

解决方案

Go to the info.plist file and add an array with key "Supported interface orientations (iPhone)" and add the following values in it:

  1. Portrait (bottom home button)

Similarly, add another array "Supported interface orientations (iPad)" and add the following:

  1. Portrait (bottom home button)
  2. Landscape (left home button)
  3. Landscape (right home button)

See below:

这篇关于适用于iPhone的纵向打印和iPad横向打印的通用应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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