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