Reputation: 5806
How would I align UILabel attributed text vertically and to the left horizontally? thanks
let style = NSMutableParagraphStyle()
style.alignment = NSTextAlignment.center
centers text both vertically and horizontally: the latter my designer does not fancy
Upvotes: 1
Views: 39
Reputation: 8327
You just have to set the alignment
property to .left
. UILabel
by default centers the text vertically:
let style = NSMutableParagraphStyle()
style.alignment = .left
Upvotes: 1