Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Florian
Florian
@Typ0genius@mastodon.social  ·  activity timestamp 4 days ago

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

A demo of the new initializer with all available roles in the toolbar and main view.
A demo of the new initializer with all available roles in the toolbar and main view.
A demo of the new initializer with all available roles in the toolbar and main view.
  • Copy link
  • Flag this post
  • Block
Der Teilweise
Der Teilweise
@teilweise@layer8.space replied  ·  activity timestamp 3 days ago

@Typ0genius 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.

  • Copy link
  • Flag this comment
  • Block
Florian
Florian
@Typ0genius@mastodon.social replied  ·  activity timestamp 3 days ago

@teilweise Honestly, I think this is fine. There is no scenario (at least in Apple's apps) where we need a close and cancel button in the same view. Yes, if there is a confirm button, it is a cancel button, as it indicates a loss of something. If there isn't something to lose, it is a close button. I think a checkmark for close wouldn't be appropriate when we look at the red window close button on macOS, which also uses an x.

  • Copy link
  • Flag this comment
  • Block
Tobias Timpe – @39C3 📞 5016
Tobias Timpe – @39C3 📞 5016
@tobias@social.tim.pe replied  ·  activity timestamp 4 days ago

@Typ0genius I was wondering where this feature went. We used to have it in like iPhone OS 2.0 for Done buttons etc.

  • Copy link
  • Flag this comment
  • Block
Florian
Florian
@Typ0genius@mastodon.social replied  ·  activity timestamp 4 days ago

@tobias I am too young to know that 😅 But I highly appreciate having a uniform definition for common buttons. I assume this is also a welcoming change for improving accessibility.

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.1-alpha.44 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Members
  • Code of Conduct