Created
June 20, 2020 19:58
-
-
Save PetreVane/c5b52ced4da03a8181999978d7bc5e2d to your computer and use it in GitHub Desktop.
Shows an images
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
var body: some View { | |
VStack(alignment: .center) { | |
Image("paris") | |
.resizable() | |
.aspectRatio(contentMode: .fill) | |
.frame(width: 300) | |
.clipShape(Capsule()) | |
.opacity(0.9) | |
.overlay( | |
Rectangle() | |
.foregroundColor(.black) | |
.opacity(0.4) | |
.cornerRadius(145)) | |
.overlay( | |
Text("This is Paris") | |
.padding() | |
.font(.largeTitle) | |
.background(Color.black) | |
.opacity(0.85) | |
.foregroundColor(.white) | |
.cornerRadius(15) | |
.frame(width: 400) | |
.shadow(color: .yellow, radius: 30, x: 0, y: -10), | |
alignment: .bottom) | |
// Capsule(style: .continuous) | |
// .frame(width: 250, height: 300, alignment: .center) | |
// .opacity(0.55) | |
// .shadow(color: .gray, radius: 35, x: 1, y: -10) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment