Created
January 29, 2021 02:09
-
-
Save nathanborror/30a6a593ebba33b1d0cd246b3639fbf2 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 FlippedUpsideDown: ViewModifier { | |
func body(content: Content) -> some View { | |
content | |
.rotationEffect(.radians(.pi)) | |
.scaleEffect(x: -1, y: 1, anchor: .center) | |
} | |
} | |
extension View { | |
func flipUpsideDown() -> some View { | |
self.modifier(FlippedUpsideDown()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment