extension View {
@ViewBuilder func visibility(_ isShow: Bool) -> some View {
if isShow {
self
} else {
}
}
extension View {
@ViewBuilder func visibility(_ isShow: Bool) -> some View {
if isShow {
self
} else {
hidden()
}
}
}
https://swiftuirecipes.com/blog/how-to-hide-a-swiftui-view-visible-invisible-gone
댓글
댓글 쓰기