How do I make text labels scale the font size with different Apple product screens?

后端 未结 2 1066
生来不讨喜
生来不讨喜 2021-01-05 07:28

This is for ios dev with swift. I have a very simplistic layout:

link1 (not enough rep to actually post the pic)

All I\'m trying to do is make sure that \"re

2条回答
  •  生来不讨喜
    2021-01-05 08:21

    You can actually do it in your Storyboard.

    1, open File Inspector tab(First tab) on your storyboard, set both Use auto layout and Use size classes check.

    2, Then you can go to your label attribute(Forth tab), you will notice that there is a "+" beside, click it to add.

    3, Choose the screen size u want like, can refer "Adaptivity and Layout" and then select your font size.

    Answer refer to THIS LINK, you can also take a look

提交回复
热议问题