-
-
Save laevandus/5d2cc8fa852979a49f99fe9fd6ad9179 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 ReplaceView: View { | |
@State private var isActive = false | |
var body: some View { | |
VStack(spacing: 16) { | |
HStack { | |
Image(systemName: isActive ? "pause.circle.fill" : "play.circle.fill") | |
.contentTransition(.symbolEffect(.replace)) | |
Image(systemName: isActive ? "pause.circle.fill" : "play.circle.fill") | |
.contentTransition(.symbolEffect(.replace.offUp)) | |
Image(systemName: isActive ? "pause.circle.fill" : "play.circle.fill") | |
.contentTransition(.symbolEffect(.replace.upUp)) | |
} | |
.imageScale(.large) | |
Button("Replace") { isActive.toggle() } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment