Member-only story

SwiftUI: How to make UITextField with inputAccessoryView and inputView?

Prafulla Singh
1 min readApr 14, 2020

--

Different input view with inputAccessoryView in Light and dark Mode

As SwiftUI TextField does not support inputAccessoryView and inputView by default, we need to create our own UIViewRepresentable. This UIViewRepresentable can wrap UITextField which we can use in SwiftUI and use it’s properties.

Now we need to implement coordinator and all related delegates.

And we are done.

How to use Demo:

--

--

Prafulla Singh
Prafulla Singh

No responses yet