Getting UILabel to produce an ellipsis rather than shrinking the font

Set the following properties:

Objective C

label.adjustsFontSizeToFitWidth = NO;
label.lineBreakMode = NSLineBreakByTruncatingTail;

Swift

label.adjustsFontSizeToFitWidth = false
label.lineBreakMode = .byTruncatingTail

You can also set these properties in interface builder.

Leave a Comment