AlertMessage
struct AlertMessage
The structure for an Alert Message
-
The
Error
Declaration
Swift
let error: Error
-
The role of the button
Declaration
Swift
let role: ButtonRole?
-
The action for the button
Declaration
Swift
var action: (() -> Void)?
-
The command to open the
DebugView
in a windowDeclaration
Swift
var debugCommand: (() -> Void)?
-
Wrap an
Error
into aLocalizedError
This to avoid an error: Protocol ‘LocalizedError’ as a type cannot conform to the protocol itself
See moreDeclaration
Swift
struct LocalizedAlertError: LocalizedError
-
Declaration
Swift
struct LocalizedAlertCustomError: LocalizedError
-
SwiftUI
See moreView
with the confirmation buttonDeclaration
Swift
struct ConfirmButton: View