I am trying to reproduce the new navigation title menu for iPad
// toolbar customizations ...
.navigationTitle($place.name) {
MyPrintButton()
}
from WWDC2022 presentation (SwiftUI on iPad: Add toolbars, titles and more) and I was not able to do this.
Can anyone do this? or maybe failed like me?
In beta 1, navigationTitle(_:actions:)
was how you would set the menu's actions.
In beta 2, a new modifier was added for this instead. It was called toolbarTitleActions(actions:)
.
As of beta 3, you will have to use the renamed toolbarTitleMenu(content:)
modifier, like this:
.toolbarTitleMenu {
MyPrintButton()
}
Note: the menu will only show when the navigation title display mode is .inline
.