textAlignment ios 12 code example Example: uilabel center text programmatically swift myLabel.textAlignment = .center