Item Alert
Presents an alert using the given data to produce the alert’s content and a text view as a title.
Platform Compatibility
Tags
SwiftUI Code
struct Item {}
@State var item: Item? = .init()
var body: some View {
Text("Foo")
.alert("Title", item: $item) { alertItem in
Button("Ok") {
print("Item nilled")
}
}
}