Answers for "how to make the font bold in attributed text in swift"

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

Code answers related to "how to make the font bold in attributed text in swift"

Code answers related to "Swift"

Browse Popular Code Answers by Language