A ColorPicker That Sets and Stores Your View's Foreground Colour Within a ViewModifier
Daily Coding Tip 094

Okay, so a ViewModifier
isn’t the best place to store data.
But I’ve realised that I haven’t spent enough time thinking about what a ViewModifier
can do, as it is a structure that can use a @State
property wrapper.
Whatever view we apply this modifier to is turned into the label of a Button. This gives the use…
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.