<!--
{
  "availability" : [
    "macOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/AlertScene/init(_:isPresented:actions:message:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI10AlertSceneV_11isPresented7actions7messageACyxq_G10Foundation23LocalizedStringResourceV_AA7BindingVySbGxyXEq_yXEtcfc::OverloadGroup"
  },
  "title" : "init(_:isPresented:actions:message:)"
}
-->

# 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.

```
@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`](/documentation/SwiftUI/ContentBuilder) returning the actions for the dialog.

`message`

A [`ContentBuilder`](/documentation/SwiftUI/ContentBuilder) returning the message for the dialog.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)