Dynamic Colors in SwiftUI using ShapeStyle in iOS 17

Jesse Squires recently asked on Mastodon whether SwiftUI still lacked support for dynamic colors. Ultimately he shared a solution that uses UIColor / NSColor under the hood to achieve the desired effect. There are other solutions floating around that work in a similar way, like one from John Sundell. We’ll need to keep doing that as long as we need to support iOS 16 and earlier, but with iOS 17 and aligned releases SwiftUI finally has a built-in answer for this: custom ShapeStyles. [Read More]