Created
June 12, 2020 16:42
-
-
Save karthironald/cfed81489221d3432b08e88b769ed83b 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
import SwiftUI | |
struct ContentView: View { | |
var cornerRadius: CGFloat = 20 | |
var body: some View { | |
VStack { | |
RoundedRectangle(cornerRadius: cornerRadius) | |
.fill(Color("kMainBg")) | |
.frame(width: 150, height: 150) | |
.shadow(color: Color("kDarkShadow"), radius: 5, x: -10, y: -10) | |
.shadow(color: Color("kLightShadow"), radius: 5, x: 10, y: 10) | |
.blur(radius: 5) // Added blur | |
.overlay( | |
Image(systemName: "2.circle.fill") // Changed image | |
.resizable() | |
.frame(width: 40, height: 40) | |
.aspectRatio(contentMode: .fit) | |
.foregroundColor(.pink) | |
) | |
} | |
.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