Contents

init(_:isPresented:actions:message:)

Creates an alert scene with a title, a set of actions, and a message. Note that this creates a text view on your behalf.

Declaration

@export(implementation) nonisolated init(_ titleResource: LocalizedStringResource, isPresented: Binding<Bool>, @ContentBuilder actions: () -> Actions, @ContentBuilder message: () -> Message)

Parameters

  • titleResource:

    Text resource for the localized string that is the title of the alert.

  • isPresented:

    A binding to a Boolean value that determines whether to present the alert. When someone presses or taps one of the alert’s actions, the system sets this value to false and dismisses.

  • actions:

    A Contentbuilder returning the actions for the dialog.

  • message:

    A Contentbuilder returning the message for the dialog.