📜  如何加粗文本 swiftui - Swift 代码示例

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

代码示例1
import SwiftUI

struct ContentView: View {
    @State var TextValue: String = "Hello"

    var body: some View {
        VStack {
            TextField("placeholder", text: $TextValue)
            .padding(.horizontal, 50)
                .font(.system(size: 30, weight: .heavy, design: .default))
        }
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}