@available, #available
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
// use case
Text("Hello, world!")
.padding()
.if(.iOS14) { $0.background(Color.red) } // โญ๏ธ use case
extension Bool {
/// โญ๏ธ Bool.iOS14
static var iOS14: Bool {
guard #available(iOS 14, *) else { return false }
return true
}
}