100 Days of SwiftUI

Day 45

2026-06-03

Project 9, part 3

More with navigation — customization

(short day today, which is good ’cause I got some other things to do)

Customizing the navigation bar appearance

  • iOS is opinionated about navigation bars, but we can make some adjustments
  • basically color, visibility, and which modifiers affect which toolbars (of which there are several types)

Placing toolbar buttons in exact locations

  • iOS will put toolbar buttons on the trailing edge of the toolbar by default
  • you can specify the placement of a ToolbarItem
    • based on position e.g. ToolbarItem(placement: .topBarLeading)
    • or function ToolbarItem(placement: .confirmationAction)
  • you can group toolbar items using ToolbarItemGroup

Making your navigation title editable

  • .inline style navigation titles can be attached to a binding variable which we can access