2025-12-29 15:17 UTC
Did you know iOS 26 introduces a new button initializer that only takes a role and an action as parameters?
Based on the role, a fully localized label with a custom icon is generated. This also provides a native way to get the sheet close and confirm buttons.
#iOSDev #SwiftUI
Replies (2)
-
@tobias@social.tim.pe 2025-12-29 15:37
@Typ0genius@mastodon.social I was wondering where this feature went. We used to have it in like iPhone OS 2.0 for Done buttons etc.
-
@teilweise@layer8.space 2025-12-30 08:32
@Typ0genius@mastodon.social Too bad the toolbar versions of .cancel and .close are indistinguishable. As is, the only way for the user to know which one it is, is by looking for a companion .confirm button. It would make (more) sense if .close was e.g. the checkmark without the highlight.