UILabel Align Text to center

The Solution to UILabel Align Text to center is


From iOS 6 and later UITextAlignment is deprecated. use NSTextAlignment

myLabel.textAlignment = NSTextAlignmentCenter;

Swift Version from iOS 6 and later

myLabel.textAlignment = .center

~ Answered on 2012-07-12 08:20:55


Most Viewed Questions: