Created
May 8, 2021 10:09
-
-
Save hitendradeveloper/822b7c00919beb9edc1c0def3c943f29 to your computer and use it in GitHub Desktop.
SwiftUI CoinFlip Front and Back views - https://medium.com/p/eb38e3bf71aa
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
// Hitendra Solanki | |
// SwiftUI Coin Flip Example | |
//Represents the FRONT view for the coint | |
struct CoinViewFront: View { | |
var body: some View { | |
Image("front") | |
.resizable() | |
} | |
} | |
//Represents the BACK view for the coint | |
struct CoinViewBack: View { | |
var body: some View { | |
Image("back") | |
.resizable() | |
.rotation3DEffect( | |
.degrees(-180), | |
axis: (x: 0.0, y: 1.0, z: 0.0) | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment