Update SwiftUI Navigation Bar on Scroll
Reading time: 1 min
This recipe shows how to update navigation bar when the content underneath it scrolls.
SwiftUI Navigation Bar Title Custom View
Reading time: 1 min
This quick recipe shows how to put any custom view in a navigation bar, replacing the default navigation bar title text. Of course, that view can be interactable and respond to user input.
SwiftUI Toolbar Placement Cheatsheet
Reading 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
ToolbarItem
end up. - Some values don't play well with each other. E.g,
.primaryAction
will hide.confirmationAction
if it's placed above it, but not if placed below. - Some positions change if
TitleDisplayMode
is.inline
.
Navigation bar styling in SwiftUI
Reading time: 2 min
This tutorial shows how to style a navigation bar in SwiftUI - changing its background color, text color, as well as styling the status bar.
Customize navigation bar button image
Reading time: 1 min
This tutorial shows how to customize the navigation bar buttons as images. It applies to both the back button, as well as the button on the right-hand side.