-
-
Save laevandus/7021432f5a762880c3fd3d85308605a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct VariableColorView: View { | |
@State private var isActive = false | |
var body: some View { | |
VStack(spacing: 16) { | |
HStack { | |
Image(systemName: "rainbow") | |
.symbolEffect(.variableColor, options: .speed(0.1), isActive: isActive) | |
Image(systemName: "rainbow") | |
.symbolEffect(.variableColor.iterative, options: .speed(0.1), isActive: isActive) | |
Image(systemName: "rainbow") | |
.symbolEffect(.variableColor.iterative.reversing, options: .speed(0.1), isActive: isActive) | |
} | |
.symbolRenderingMode(.multicolor) | |
.imageScale(.large) | |
Button("Variable Color") { isActive.toggle() } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment