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.