Post

Replies

Boosts

Views

Activity

How do I dismiss the keyboard when using TextEditor or TextField?
When using SwiftUI TextEditor or TextField, is there a built-in method of dismissing the keyboard? For example, if I am writing notes in a TextEditor, could I tap a "Done" button that triggers an action to dismiss the keyboard so I can view my notes full screen? The closest solution I could find involves UIKit, but I would like to know if there is any pure SwiftUI implementation I could use.
4
0
5.4k
Jul ’20