Seems like UITextAlignmentCenter
is deprecated in iOS 6.
I still use it and works well, but it gives a warning.
How can I fix this?
<
For Swift 5+ use:
yourLabel.textAlignment = .center
where You can set:
public enum NSTextAlignment : Int {
case left = 0 // Visually left aligned
case center = 1 // Visually centered
case right = 2 // Visually right aligned
case justified = 3 // Fully-justified. The last line in a paragraph is natural-aligned.
case natural = 4 // Indicates the default alignment for script
}