Image for post
Image for post

TextField and UIViewRepresentable

Building a custom TextField with UIViewRepresentable

UITextField and delegates

textField:shouldChangeCharactersInRange:replacementString:

textFieldDidEndEditing:

textFieldShouldReturn:

Image for post
Image for post
Fig.1 — Simple scaffolding schema within a VStack container.

UIViewControllerRepresentable

Wrap it up: a real world example

Image for post
Image for post
A simple TextField replacement with focusing and dismissing

Written by

 advocate •📱architect

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store