Skip to content

Instantly share code, notes, and snippets.

@SarahAlsharif
Created February 9, 2022 13:24
Show Gist options
  • Select an option

  • Save SarahAlsharif/84fb83d1871a7d48ca77ca768b7328c4 to your computer and use it in GitHub Desktop.

Select an option

Save SarahAlsharif/84fb83d1871a7d48ca77ca768b7328c4 to your computer and use it in GitHub Desktop.
struct CardBack : View {
let width : CGFloat
let height : CGFloat
@Binding var degree : Double
var body: some View {
ZStack {
RoundedRectangle(cornerRadius: 20)
.stroke(.blue.opacity(0.7), lineWidth: 3)
.frame(width: width, height: height)
RoundedRectangle(cornerRadius: 20)
.fill(.blue.opacity(0.2))
.frame(width: width, height: height)
.shadow(color: .gray, radius: 2, x: 0, y: 0)
RoundedRectangle(cornerRadius: 20)
.fill(.blue.opacity(0.7))
.padding()
.frame(width: width, height: height)
RoundedRectangle(cornerRadius: 20)
.stroke(.blue.opacity(0.7), lineWidth: 3)
.padding()
.frame(width: width, height: height)
Image(systemName: "seal.fill")
.resizable()
.frame(width: 40, height: 40)
.foregroundColor(.blue.opacity(0.7))
Image(systemName: "seal")
.resizable()
.frame(width: 80, height: 80)
.foregroundColor(.white)
Image(systemName: "seal")
.resizable()
.frame(width: 150, height: 150)
.foregroundColor(.blue.opacity(0.7))
}.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