19
Apr
2021
SwiftUI Toolbar Placement Cheatsheet
swiftui navigationbar toolbar toolbaritem placement toolbaritemplacementReading time: 5 min
This recipe is a cheatsheet for various ToolbarItemPlacement values and combinations on iOS. This is useful because:
- The namings of the placement values don't necessarily clearly depict where will a
ToolbarItemend up. - Some values don't play well with each other. E.g,
.primaryActionwill hide.confirmationActionif it's placed above it, but not if placed below. - Some positions change if
TitleDisplayModeis.inline.
Search our recipes
Check out the companion apps!
Our free companion app and XCode Extension brings 100+ SwiftUI recipes right at your fingertips! Get a preview of it in the Online Companion.
Have a recipe for us?
Get in touch and let's grow the cookbook together!