0

I need a small button to be visible in most of my views, so I tried placing it in the toolbar. If I set ToolbarItem.placement to .cancellationAction, it will show left of the title, which is ok. It'd be be ideal though, if the the button would show at the trailing edge of the toolbar. When I use .confirmationAction to achieve this, it will show there, but be covered by the time (except on the root view! time won't show there).

.navigationTitle("A title")
.toolbar(content: {
    ToolbarItem(placement: .confirmationAction, content: {
        MyButton()
    })
})

I think it is against Apple's guidelines to hide time on WatchOS, but it wouldn't matter in my case, since the app won't be published on AppStore.

How can I place a view at the trailing edge of my WatchOS toolbar, while making sure time won't overlap it?

Thanks.

szagun
  • 123
  • 8
  • I don't think that's possible for watchOS 9 and earlier. With the new watchOS 10 in some months, this will be changed. You can watch the [WWDC video](https://developer.apple.com/videos/play/wwdc2023/10026/). – bennyyy999 Jun 23 '23 at 16:28

0 Answers0