Skip to content

Instantly share code, notes, and snippets.

@PetreVane
Created June 20, 2020 19:58
Show Gist options
  • Save PetreVane/c5b52ced4da03a8181999978d7bc5e2d to your computer and use it in GitHub Desktop.
Save PetreVane/c5b52ced4da03a8181999978d7bc5e2d to your computer and use it in GitHub Desktop.
Shows an images
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