swift ui center text code example
Example 1: center text swiftui
.multilineTextAlignment(.center)
Example 2: uilabel center text programmatically swift
myLabel.textAlignment = .center
.multilineTextAlignment(.center)
myLabel.textAlignment = .center