iPhone 6 Plus 分辨率混淆:Xcode 还是 Apple 的网站?发展 [英] iPhone 6 Plus resolution confusion: Xcode or Apple's website? for development

查看:51
本文介绍了iPhone 6 Plus 分辨率混淆:Xcode 还是 Apple 的网站?发展的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apple 网站声称分辨率为 1080p:1920 x 1080

Apple's website claims that the resolution is 1080p: 1920 x 1080

但是Xcode(今天推出8.0 GM)要求的启动画面是2208 x 1242.

However, the launch screen required by Xcode (8.0 GM launched today) is 2208 x 1242.

谁是对的?

推荐答案

iPhone 6+ 在内部使用 @3x 资源以 2208×1242 的虚拟分辨率进行渲染(736x414 点),然后将其采样以进行显示.与在 Retina MacBook 上使用缩放分辨率相同 - 它可以让它们达到像素资产的整数倍,同时仍然具有例如12 pt 文本在屏幕上看起来大小相同.

The iPhone 6+ renders internally using @3x assets at a virtual resolution of 2208×1242 (with 736x414 points), then samples that down for display. The same as using a scaled resolution on a Retina MacBook — it lets them hit an integral multiple for pixel assets while still having e.g. 12 pt text look the same size on the screen.

所以,是的,启动屏幕需要有那个尺寸.

So, yes, the launch screens need to be that size.

6、5s、5、4s 和 4 都是每英寸 326 像素,并使用 @2x 资产来保持所有以前设备的每英寸大约 160 点.

The 6, the 5s, the 5, the 4s and the 4 are all 326 pixels per inch, and use @2x assets to stick to the approximately 160 points per inch of all previous devices.

6+ 是每英寸 401 像素.因此,假设它大约需要@2.46x 资产.相反,Apple 使用 @3x 资产并将完整输出缩小到其自然大小的 84% 左右.

The 6+ is 401 pixels per inch. So it'd hypothetically need roughly @2.46x assets. Instead Apple uses @3x assets and scales the complete output down to about 84% of its natural size.

在实践中,Apple 决定采用更多接近 87% 的比例,将 1080 变成 1242.毫无疑问,这是为了找到尽可能接近 84% 的东西,仍然在两个方向上产生整数尺寸——1242/1080 = 2208/1920,而如果你把 1080 变成了,比如说,1286,你需要以某种方式垂直渲染 2286.22 像素才能很好地缩放.

In practice Apple has decided to go with more like 87%, turning the 1080 into 1242. No doubt that was to find something as close as possible to 84% that still produced integral sizes in both directions — 1242/1080 = 2208/1920 exactly, whereas if you'd turned the 1080 into, say, 1286, you'd somehow need to render 2286.22 pixels vertically to scale well.

这篇关于iPhone 6 Plus 分辨率混淆:Xcode 还是 Apple 的网站?发展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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