Swift dynamic uilabel size

Hey I am desperate how I can make my app looks good for all end devices. I have e.g. a completely normal label with the text "Start" and the size UIFont (name: "Arial", size: 35). It also looks good on an Iphone 12 pro max, but the text on an iphone se is simply way too big. How do I get it to look good? And why can't apple adjust the size itself? I would be very happy to hear from you. Best regards

You should do several things:

  • create constraints to adapt the size of the label frame
  • select Minimum Font scale or Minimum Font size in Autoshrink
  • set the value to the minus (0.5 means that with initial size of 35, it will not be less than 17).

In this capture, initial size was 17. Yours should be 35.

.

why can't apple adjust the size itself?

On which basis, if you do not define constraints ? And that's exactly what iOS does by itself with the steps I proposed before.

Swift dynamic uilabel size
 
 
Q