Reading time: 1 min

This recipe shows how to add a toolbar with action buttons on the top of soft keyboard in SwiftUI. The end result looks like this:

Simulator%20Screen%20Shot%20-%20iPhone%20SE%20%282nd%20generation%29%20-%202021-08-19%20at%2020.31.05

This feature is available starting with SwiftUI 3 (iOS 15, macOS 12).

The pattern for adding the toolbar to the keyboard is the same as with toolbar setups,...

Continue Reading...

Reading time: 5 min

This recipe is a cheatsheet for various ToolbarItemPlacement values and combinations on iOS. This is useful because:

  1. The namings of the placement values don't necessarily clearly depict where will a ToolbarItem end up.
  2. Some values don't play well with each other. E.g, .primaryAction will...

Continue Reading...