Michael Long
Jul 22, 2023

--

For buttons you're better off creating your own distinct ButtonStyles and using the buttonStyle modifier. That gives you more control over the style, including handling isPressed and isDisabled states.

You can also add your own extensions such that they're easier to autocomplete, just like Apple's.

.buttonStyle(.custom)

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet