Skip to content

Instantly share code, notes, and snippets.

@anupamchugh
Created November 3, 2019 19:40
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/9b51ee88d50e94946dc6351a6bddf35e to your computer and use it in GitHub Desktop.
Save anupamchugh/9b51ee88d50e94946dc6351a6bddf35e to your computer and use it in GitHub Desktop.
struct BarView: View{
var value: CGFloat
var cornerRadius: CGFloat
var body: some View {
VStack {
ZStack (alignment: .bottom) {
RoundedRectangle(cornerRadius: cornerRadius)
.frame(width: 30, height: 200).foregroundColor(.black)
RoundedRectangle(cornerRadius: cornerRadius)
.frame(width: 30, height: value).foregroundColor(.green)
}.padding(.bottom, 8)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment