Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
Structure

Alert

The Compose SwiftUI form of SwiftUI's Alert.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
class Alert

Overview

This is the Kotlin form of SwiftUI Alert: SwiftUI documentation. In Swift it reads:

struct Alert

Topics

Initializers

constructor(title: String, message: String? = null, dismissButton: Alert.Button? = null)
SwiftUI Alert.init(title:message:dismissButton:)
constructor(title: String, message: String? = null, primaryButton: Alert.Button, secondaryButton: Alert.Button)
SwiftUI Alert.init(title:message:primaryButton:secondaryButton:)

Methods

fun sideBySideButtons(title: String, message: String? = null, primaryButton: Alert.Button, secondaryButton: Alert.Button): Alert
SwiftUI Alert.sideBySideButtons(title:message:primaryButton:secondaryButton:) · iOS: unavailable (no-op), macOS: unavailable (no-op), tvOS: unavailable (no-op), watchOS 10.0+
fun destructive(label: String): Alert.Button
SwiftUI Alert.Button.destructive(_:action:)
fun cancel(label: String): Alert.Button
SwiftUI Alert.Button.cancel(_:action:)
fun cancel(): Alert.Button
SwiftUI Alert.Button.cancel(_:)
fun default(label: String): Alert.Button
SwiftUI Alert.Button.default(_:action:)

Types

class Alert
SwiftUI Alert
class Button
SwiftUI Alert.Button