0

I'm implementing dynamic types in my iOS 10 app using custom fonts. However, when using the largest text setting, the UILabel gets clipped - (I don't know the exact term to describe this. If you know, please correct me) - please see screenshot below:

enter image description here

the UILabel for "Date" below has the same settings for the UILabel "name" so I wonder why it has a different behavior. I want the text to not be clipped.

EDIT: here is a screenshot of the UILabel properties

enter image description here

binsnoel
  • 276
  • 2
  • 17
  • Looks like the label's height isn't being adjusted for the larger font. How is your label setup? Show relevant code or a screenshot of the relevant settings in your storyboard. – rmaddy Mar 10 '17 at 03:54
  • @rmaddy i added a screenshot of the `UILabel` properties – binsnoel Mar 10 '17 at 04:57

1 Answers1

0

You can use minimumScaleFactor programmatically

yourLabel.adjustsFontSizeToFitWidth=YES;

yourLabel.minimumScaleFactor=0.5;

This will take care of your font size according width of label and text.

Rajesh Dharani
  • 285
  • 4
  • 20