Contents

baselineAdjustment

An option that controls whether the text’s baseline remains fixed when text needs to shrink to fit in the label.

Declaration

var baselineAdjustment: UIBaselineAdjustment { get set }

Discussion

If adjustsFontSizeToFitWidth is true, this property controls the behavior of the text baselines in situations where the text needs the font size adjusted in order to fit. The default value of this property is UIBaselineAdjustment.alignBaselines. This property is effective only when the numberOfLines is 1.

See Also

Sizing the label’s text