Skip to content

Instantly share code, notes, and snippets.

@karthironald
Created June 12, 2020 16:46
Show Gist options
  • Save karthironald/23abe420a2660838557f7a38704f7369 to your computer and use it in GitHub Desktop.
Save karthironald/23abe420a2660838557f7a38704f7369 to your computer and use it in GitHub Desktop.
import SwiftUI
struct ContentView: View {
var cornerRadius: CGFloat = 20
var body: some View {
VStack {
ZStack {
Circle()
.fill(Color("kMainBg"))
.frame(width: 150, height: 150)
Circle()
.fill(Color("kMainBg"))
.frame(width: 100, height: 100)
.blur(radius: 10)
.shadow(color: Color("kDarkShadow"), radius: 40, x: -18, y: -18)
.shadow(color: Color("kLightShadow"), radius: 40, x: 18, y: 18)
Circle()
.fill(Color("kMainBg"))
.frame(width: 80, height: 80)
.shadow(color: Color("kLightShadow"), radius: 12, x: -7, y: -7)
.shadow(color: Color("kDarkShadow"), radius: 12, x: 7, y: 7)
.overlay(
Image(systemName: "4.circle.fill")
.resizable()
.frame(width: 40, height: 40)
.aspectRatio(contentMode: .fit)
.foregroundColor(.pink)
)
}
.mask(
Circle()
)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color("kMainBg"))
.edgesIgnoringSafeArea(.all)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment