Automate Your Builds and Testing with Bitrise
Changing SwiftUI Modifiers Based on State
December 14, 2020 · 1 min read
In this video, I show you have to add/change modifiers on a SwiftUI view based on a condition in your application state. There are times you want to change the look of something based on view state, this is one way to do it.
The repository for the project in this video can be found here https://github.com/GrfxGuru/SwiftUIConditionalModifiers
In this video I mention a forums.swift.org post, you can find that post here https://forums.swift.org/t/conditionally-apply-modifier-in-swiftui/32815