Answers for "swift ui font weight"

1

how to bold text swiftui

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()
    }
}
Posted by: Guest on February-02-2021
0

how to set the font of text in swiftui

Text("Simple Swift Guide").font(.system(size: 45, weight: .bold, design: .default))
Posted by: Guest on December-09-2020

Code answers related to "Swift"

Browse Popular Code Answers by Language