There are a ton of things to love about SwiftUI. But one of my favorites it's got to be the possibility of previewing Variants: the possibility of seeing your UI in dark/light modes, all dynamic type sizes, and orientations, side-by-side.

Variants can be found as a button in SwiftUI's content view in Xcode and let you choose between

You may also find interesting...

If you are displaying something in two or more columns, you may want to change that to as little as one column when using some of the largest Dynamic Type settings to keep the text readable.

Grouping elements in SwiftUI is extremely easy! You can use the .accessibility(children: .combine) modifier. And that's it! It merges properties. For example, generating an accessibility label by joining the children's ones, separated by commas.

If, for some reason, you are creating a button from scratch, instead of relying on UIButton (perhaps you are adding a fancy micro interaction animation?), take into account that you’ll need to configure the button accessibility trait.

Created in Swift with Ignite.

Supporting Swift for Swifts