Search code examples
iosxcodeautolayoutinterface-builder

UILabel text gets truncated with large font size


The text inside my UILabel in Interface Builder is being truncated when the text is a large font size. The UILabel does scroll vertically when the characters exceed the viewport size, but at one point the text is simply truncated. Can anyone advise?

The element hierarchy is: Scroll View > View > UILabel

UILabel AutoLayout properties are set to:

  • Lines: 0
  • Line Break: Word Wrap
  • Autoshrink: Fixed Font Size

I would prefer to keep everything in AutoLayout rather than set the properties programmatically.


Solution

  • You are set the property of Label. So that according to device its set font size is auto.

    Autoshrink : Minimum Font scale

    Scale : 0.7

    enter image description here