📜  使文本自动调整大小 swiftui - Swift 代码示例

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

代码示例1
struct ContentView : View {
var body: some View {
    ZStack {
        Circle().strokeBorder(Color.red, lineWidth: 30)
        Text("Text")
            .scaledToFill()
            .minimumScaleFactor(0.5)
            .lineLimit(1)
    }
}