how to add button to alert swiftui
@State var showAlert = false
var body: some View {
Button(action: {
self.showAlert = true
}) {
Text("Show Alert")
}
.presentation($showAlert) {
Alert(title: Text("Title"), message: Text("Message..."),
primaryButton: .default (Text("OK")) {
print("OK button tapped")
},
secondaryButton: .cancel()
)
}
}
Also in Swift:
- displaying button title swift stackoverflow
- alertdialog flutter
- swift string keep only numbers
- add toggle without text swiftui
- special symbol ios swift
- swift
- map swift
- swift get slected row data in tableview cell
- swift open web page
- swift 5 progress bar height
- Make a VStack fill the width of the screen in SwiftUI
- swift play video from url
- check google ads sdk version swift
- fetch request core data
- button sizetofit not working swift
- how to use alamofire pod in swift 5
- disable commit editing style swift
- how do i have countdown timer in swift stackoverflow
- setting a local notification at specific time every day swift
- button color swiftui
- show back button in navbar swift
- how to find circle point in line chart swift 4 site:stackoverflow.com
- swift 5 only the day number from date
- enum from raw value swift