Skip to content

Instantly share code, notes, and snippets.

@anupamchugh
Created June 13, 2022 15:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anupamchugh/d45a52d0fe267d32fe5628321a638f5d to your computer and use it in GitHub Desktop.
Save anupamchugh/d45a52d0fe267d32fe5628321a638f5d to your computer and use it in GitHub Desktop.
struct PosterView : View{
@Binding var bgColor: Color
@Binding var text: String
var body: some View{
ZStack {
Rectangle().fill($bgColor.wrappedValue.gradient)
.cornerRadius(20)
VStack {
Text(text)
.font(.largeTitle)
.foregroundColor(.white)
.minimumScaleFactor(0.5)
.padding()
Image(systemName: "swift")
.font(.system(size: 80))
.backgroundStyle(.clear)
.foregroundStyle(.white)
.padding(20)
}
}
.padding()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment