I want to change the format, color, for font-style of the input font shown inside textfields as a user enters their information..
I assume this would be a modifier to the TextField view itself?
Thank you
struct ContentView: View {
@State var email = ""
var body: some View {
TextField("email", text: $email)
//apply modifier here???
}
}
2
Answers
Yes, modifiers work on the
TextField
:If you want your views to follow a style-guide in your app, you could define
viewModifier
andextension
like this.And then use it like this