How do I put some space between the left side of a label and the beginning of the text?

77 Views Asked by At

How do I put some space between the left side of a label and the beginning of the text? I try to adjust the edge insets, but it is get only.

The code:

label.alignmentRectInsets = UIEdgeInsets(top: 2, left: 2, bottom: 2, right: 2)

Gets an error message:

Cannot assign to property: 'alignmentRectInsets' is a get-only property

0

There are 0 best solutions below