“显示缩放" iPhone 6/6s设置模糊图形 [英] 'Display Zoom' iPhone 6/6s setting blurs graphics

查看:129
本文介绍了“显示缩放" iPhone 6/6s设置模糊图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用Xcode 7/Swift 2编写一个专为iPhone 6/6s优化的项目(即该项目具有启动屏幕文件和适用于iPhone 6/6s的启动屏幕图像).

I'm writing a project in Xcode 7 / Swift 2 that it is optimized for iPhone 6/6s (i.e. the project has a launch screen file and launch screen images for iPhone 6/6s).

幸运的是,iPhone 6用户可以打开设备上的显示缩放"设置,以放大界面元素.启用后,此设置有效地放大了标准的iPhone 5屏幕尺寸以适合iPhone 6屏幕空间,并向上采样至x1.171875.这种上采样会导致基于栅格的元素(例如包含UIBezierPath()绘图的图像,图标或视图)显示模糊(轻微但引人注意).

Fortunately or unfortunately, iPhone 6 users have the ability to turn on the ‘Display Zoom’ setting on device which enlarges elements of the interface. When turned on, this setting effectively enlarges a standard iPhone 5 screen size to fit in the iPhone 6 screen space, upsampling to x1.171875. This upsampling causes elements that are raster based such as images, icons, or views that contain UIBezierPath() drawings to display blurred (mildly but noticable).

一些问题:

感谢对此难题的任何有经验的回答.谢谢.

1-我如何指示代码中的情节提要中的元素(例如UIView)在用户打开时忽略显示缩放设置?

1 - How can I instruct elements (e.g. a UIView) on the Storyboard in code to disregard the Display Zoom setting when the user has turned it on?

2-启用显示缩放"功能时,有哪些技术可确保保持像素完美的精度? (例如,是否可以使用OpenGL渲染来渲染图形,如果可以,如何?)

2 - What techniques are there to ensure pixel perfect accuracy remains when Display Zoom is on? (e.g. Is it possible to render graphics using OpenGL rendering, if so, how?)

3-启用显示缩放"功能时,是否可以将x2图像替换为x4图像以减少模糊? (即iOS能否将x4图像降采样为iPhone 6上的x2图像?)

3 - Is it possible to replace a x2 image with a x4 image to reduce any blurring when Display Zoom is on? (i.e. will iOS downsample a x4 image to x2 image on iPhone 6?)

4-启用显示缩放"功能后,UIBezierPath()图形如何保持像素的完美精度?

4 - How can UIBezierPath() drawings maintain pixel perfect accuracy when Display Zoom is on?

推荐答案

您对此无能为力.选择缩放模式的用户有意放弃像素精度.图形中的点不再与屏幕上的像素一对一(或一对二或一对三或任何整数比)匹配.因此,此选择会模糊用户执行的所有操作的屏幕,而不仅仅是您的应用.

There's nothing you can do about this. A user who chooses zoomed mode is deliberately throwing away pixel accuracy. The points in the drawing no longer match the pixels on the screen one-to-one (or one-to-two or one-to-three or any integral ratio). This choice therefore blurs the screen for everything the user does, not just your app.

您也无法检测到正在发生的事情,因为实际上缩放的iPhone 6作为iPhone 5呈现给您的应用程序(缩放的6 Plus作为6呈现给您的应用程序).

Nor can you detect what is happening, because in effect zoomed iPhone 6 is presented to your app as an iPhone 5 (and a zoomed 6 Plus is presented to your app as a 6).

这篇关于“显示缩放" iPhone 6/6s设置模糊图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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