Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
240 views
in Technique[技术] by (71.8m points)

ios - When upgrading to support iPhone X, font display smaller on older devices

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

  • Before:

enter image description here

  • After:

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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).

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...