Text alignment
suggest changeSwift
label.textAlignment = NSTextAlignment.left
//or the shorter
label.textAlignment = .left
Any value in the NSTextAlignment
enum is valid: .left
, .center
, .right
, .justified
, .natural
Objective-C
label.textAlignment = NSTextAlignmentLeft;
Any value in the NSTextAlignment
enum is valid: NSTextAlignmentLeft
, NSTextAlignmentCenter
, NSTextAlignmentRight
, NSTextAlignmentJustified
, NSTextAlignmentNatural
Vertical alignment in UILabel
is not supported out of the box: http://stackoverflow.com/questions/1054558/vertically-align-text-to-top-within-a-uilabel
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents