升级以支持 iPhone X 时,旧设备上的字体显示较小 [英] When upgrading to support iPhone X, font display smaller on older devices

查看:43
本文介绍了升级以支持 iPhone X 时,旧设备上的字体显示较小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我添加了一些启动图像以支持 iPhone X 后,标签文本显示更小.我该如何解决这个问题?谢谢!

After I've added some launch images to support iPhone X, the label text diplay smaller. How can I fix this problem? Thank you!

  • 之前:

  • 之后:

推荐答案

这既不坏也不意外.在没有任何启动图像的情况下,应用程序运行起来就好像这是一个小得多的设备,例如屏幕尺寸为 320 x 480.它比 iPhone X 窄,因此它被放大(缩放)到设备屏幕的宽度(这样我们从顶部和底部,而不是从侧面,作为你的第一个信箱截图显示).

That's neither bad nor unexpected. Without any launch image, the app runs as if this were a much smaller device, e.g. with a screen size of 320 x 480. That is narrower than the iPhone X so it is enlarged (zoomed) to the width of the device screen (so that we letterbox from the top and bottom, but not from the sides, as your first screenshot shows).

使用启动图像时,字体和放大消失了,您以 375 x 812 的屏幕尺寸原生运行.现在我们在相同尺寸的屏幕上看到更多的宽度点,因此相同的点尺寸字体看起来更小,就像在更广阔的视野中从更远的地方看到的房子.

With the launch image, that letterboxing and enlargement goes away and you run natively with a screen size of 375 x 812. Now we are seeing more points of width on the same size screen, so the same point size font appears smaller, like a house seen from further away in a wider field of view.

您可以通过使用和不使用启动图像记录 UIScreen.main.bounds 来轻松确认这一点.

You can easily confirm this by logging UIScreen.main.bounds with and without the launch image.

这篇关于升级以支持 iPhone X 时,旧设备上的字体显示较小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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