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

查看:28
本文介绍了如何为 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天全站免登陆