SwiftUI text-alignment

You can do this via the modifier .multilineTextAlignment(.center).

Apple Documentation


From SwiftUI beta 3 forward, you can center a text view with the frame modifier:

Text("Centered")
    .frame(maxWidth: .infinity, alignment: .center)