Skip to content

Instantly share code, notes, and snippets.

@SarahAlsharif
Created February 9, 2022 13:23
Show Gist options
  • Save SarahAlsharif/5a71a352fdb13bf114aa9687b43c436a to your computer and use it in GitHub Desktop.
Save SarahAlsharif/5a71a352fdb13bf114aa9687b43c436a to your computer and use it in GitHub Desktop.
struct CardFront : View {
let width : CGFloat
let height : CGFloat
@Binding var degree : Double
var body: some View {
ZStack {
RoundedRectangle(cornerRadius: 20)
.fill(.white)
.frame(width: width, height: height)
.shadow(color: .gray, radius: 2, x: 0, y: 0)
Image(systemName: "suit.club.fill")
.resizable()
.frame(width: 80, height: 80)
.foregroundColor(.red)
}.rotation3DEffect(Angle(degrees: degree), axis: (x: 0, y: 1, z: 0))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment