A container for an alert presentation.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Swift
UI
Declaration
struct Alert
A container for an alert presentation.
SDKs
Framework
struct Alert
init(title: Text, message: Text?, primary Button: Alert .Button, secondary Button: Alert .Button)
Creates an alert with two buttons.
static func side By Side Buttons(title: Text, message: Text?, primary Button: Alert .Button, secondary Button: Alert .Button) -> Alert
Creates a side by side button alert.
struct Alert .Button
A button representing an operation of an alert presentation.
struct Action Sheet
A storage type for an action sheet presentation.