Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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