Post

Yes, close is to my knowledge trailing in as it is usually the only toolbar button. However, the button in messages is actually labeled as a cancel button when using VoiceOver (makes sense, content gets lost when closing it).

0 reposts1 like

Florian@typ0genius.com

After yesterday’s example of the new button roles, I want to go a bit in depth as I mixed up a few things. With iOS 26, there are now four button roles: close and confirm (26+), destructive and cancel (15+). #iOSDev #SwiftUI

Yup, but how best to combine the ButtonRole and the ToolbarItemPlacement? Because if you use a close role in a cancellation placement, the button is on the leading edge.

As there are confirmation, cancellation, and destructive placements, I would use them for the respective roles. As there isn’t a close placement, I would use the default one, which is trailing. Apple does that e.g. in the App Store account sheet, where the close button is trailing.