Text alignment

suggest change

Swift

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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents