📜  中心文本 swiftui - Swift 代码示例

📅  最后修改于: 2022-03-11 15:01:02.584000             🧑  作者: Mango

代码示例2
.multilineTextAlignment(.center)
//From SwiftUI beta 3 forward, you can center a text view with the frame modifier:
Text("Centered")
    .frame(maxWidth: .infinity, alignment: .center)