I created a UIViewRespresentable for a UITextField. I'd like to apply modifiers:
myTextField.font(.headline).keyboardType(keyboardType)
This is not working, even if my UIViewRepresentable is simple:
class MyTextField: UITextField { ... }
struct MyFieldField: UIViewRepresentable {
private let field = MyTextField()
func makeUIView(context: Context) -> MyTextField { return field }
func updateUIView(_ uiView: MyTextField, context: Context) {
...
}
}