In SwiftUI how can I give a parent view height 0 and hide all the children (because parent height is 0). This code still shows ZStack. It is taking height from the children.
ZStack {
RoundedRectangle(cornerRadius: 10.0, style: /*@START_MENU_TOKEN@*/.continuous/*@END_MENU_TOKEN@*/)
.fill(Color.red)
Image(systemName: "checkmark.circle.fill")
.foregroundColor(.white)
}
.frame(maxHeight: 0)
.animation(.spring())