Tuck button under navigation bar on watchOS like Mail app

Hello,

Could someone please point me in the right direction? Using SwiftUI how do I tick a button above a list under the navigation bar on watchOS like the mail app on watch.
So when you pull down the list, the button appears from under the navigation bar ? Thanks

Replies

You can place the button in the toolbar with the ToolbarItemPlacement.primaryAction placement.

.toolbar {
    ToolbarItem(placement: .primaryAction) {
        // place button here
    }
}
  • Thanks, Kind of what I'm looking for but Ill have to work out why its not hidden to start with. It does work for tucking the button under when scrolling.

Add a Comment

Toolbar buttons should be hidden by default on watchOS. You can learn more about them at 12:25 in this video: https://developer.apple.com/videos/play/wwdc2020/10171/