Turn Any View Into a Toggle Using One Simple Modifier
Daily Coding Tip 095

In yesterday’s Daily Coding Tip I was talking about adding a @State property wrapper to a ViewModifier, but what happens when I use a @Binding?
It’s pretty easy to have a Button that uses the view as a label, and it’s easy to toggle a Binding<Bool> as well.
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.

