Skip to content

Instantly share code, notes, and snippets.

@laevandus
Created August 19, 2023 10:08
Show Gist options
  • Save laevandus/f090f71c7f933a843b48b9116377c590 to your computer and use it in GitHub Desktop.
Save laevandus/f090f71c7f933a843b48b9116377c590 to your computer and use it in GitHub Desktop.
struct ScaleView: View {
@State private var isActive = false
var body: some View {
VStack(spacing: 16) {
HStack {
Image(systemName: "drop.fill")
.symbolEffect(.scale.up, isActive: isActive)
Image(systemName: "drop.fill")
.symbolEffect(.scale.down, options: .speed(0.1), isActive: isActive)
Image(systemName: "drop.fill")
.symbolEffect(.scale.down, options: .speed(5), isActive: isActive)
}
.imageScale(.large)
Button("Scale") { isActive.toggle() }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment