如何开发或迁移iPhone 5屏幕分辨率的应用程序? [英] How to develop or migrate apps for iPhone 5 screen resolution?

查看:187
本文介绍了如何开发或迁移iPhone 5屏幕分辨率的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新的iPhone 5显示器具有新的宽高比和新的分辨率(640 x 1136像素)。

The new iPhone 5 display has a new aspect ratio and a new resolution (640 x 1136 pixels).

开发新的或转换已有的应用程序需要什么到新的屏幕大小?

What is required to develop new or transition already existing applications to the new screen size?

我们应该记住什么才能让旧显示器和新宽屏宽高比的应用程序通用?

What should we keep in mind to make applications "universal" for both the older displays and the new widescreen aspect ratio?

推荐答案


  1. 下载并安装 Xcode

  2. 为您的应用设置启动屏幕文件(在目标设置的常规选项卡中)。这就是你如何使用任何屏幕的完整尺寸,包括iOS 9中的iPad分割视图尺寸。

  3. 测试你的应用程序,并希望别的什么都不做,因为一切都应该神奇地工作,如果您已正确设置自动调整大小的蒙版,或使用了自动布局。

  4. 如果没有,请调整视图布局,最好使用自动布局。

  5. 如果你需要特别针对较大的屏幕做一些事情,那么看起来你必须检查 [[UIScreen mainScreen] bounds] 的高度,因为似乎有没有具体的API。从iOS 8开始,还有一些大小类可以将屏幕大小抽象为常规或紧凑的垂直和水平,并且是推荐用于调整UI的方法。

  1. Download and install latest version of Xcode.
  2. Set a Launch Screen File for your app (in the general tab of your target settings). This is how you get to use the full size of any screen, including iPad split view sizes in iOS 9.
  3. Test your app, and hopefully do nothing else, since everything should work magically if you had set auto resizing masks properly, or used Auto Layout.
  4. If you didn't, adjust your view layouts, preferably with Auto Layout.
  5. If there is something you have to do for the larger screens specifically, then it looks like you have to check height of [[UIScreen mainScreen] bounds] as there seems to be no specific API for that. As of iOS 8 there are also size classes that abstract screen sizes into regular or compact vertically and horizontally and are recommended way to adapt your UI.

这篇关于如何开发或迁移iPhone 5屏幕分辨率的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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