โฌ๏ธ ้่ฆ๏ผ .if(_:then:)
import SwiftUI extension View { // view.hideIf(_:) @ViewBuilder public func hideIf(_ condition: @autoclosure () -> Bool) -> some View { self.if(condition()){ $0.hidden() } } }
compare : .show(if:) - optional view.
Last updated 2 years ago