Undo/Redo with SwiftUI TextField
Reading time: 1 min
This recipe shows how to implement undo and redo with SwiftUI TextField.
Insert Image into SwiftUI Text
Reading time: 1 min
This recipe shows how to insert an Image into SwiftUI Text, so that the resulting view is still a Text
instance.
SwiftUI Auto Size/Shrink Text
Reading time: 1 min
This quick recipe shows how to make the SwiftUI Text automatically adjust its size/shrink based on its frame size.
Chips/Tags Input View in SwiftUI
Reading time: 3 min
This recipe shows how to implement a chips/tags input view in SwiftUI. It is a TextField
that parses its input and stores it as deletable chips. It responds to space, submit and backspace events to allow for seamless editing of chips/tags from within the text field.
Detect Backspace in SwiftUI
Reading time: 2 min
This recipe shows how to detect backspace event in SwiftUI TextField. The method can figure out both if it's a forward or in-text backspace, and doesn't rely on hacks on hidden characters.