center text in UILabel swift code example Example: uilabel center text programmatically swift myLabel.textAlignment = .center