I have a problem with a subclass of UILabel cutting off the text below. The label has the correct height to fit the text, there is some space at the bottom, but the text is still cropped.

Red bars are added to the label layer.
I will subclass the label to add insertion inserts.
override func sizeThatFits(size: CGSize) -> CGSize { var size = super.sizeThatFits(size) size.width += insets.left + insets.right size.height += insets.top + insets.bottom return size } override func drawTextInRect(rect: CGRect) { super.drawTextInRect(UIEdgeInsetsInsetRect(rect, insets)) }
However, in this particular case, the inserts are zero.
source share