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