Styling the Toggle in SwiftUI

Customising the humble iOS switch in your SwiftUI apps

Mark Lucking
Better Programming
Published in
3 min readFeb 18, 2021

--

Pink tablet
Photo by Hillary Black on Unsplash.

The style keyword appears in a number of constructs in Swift. I think it is a tool few of us really use, which is a lost opportunity in the case of SwiftUI since you can do some interesting things with “standard” components if you start working with it.

--

--

Coding for 35+ years, enjoying using and learning Swift/iOS development. Writer @ Better Programming, @The StartUp, @Mac O’Clock, Level Up Coding & More