---
title: UISceneClosureConfirmation
framework: uikit
role: symbol
role_heading: Class
path: uikit/uisceneclosureconfirmation
---

# UISceneClosureConfirmation

A configuration specifying a confirmation dialog that will be shown before a user action will result in destruction of the scene session and the disconnection of the scene.

## Declaration

```swift
@MainActor class UISceneClosureConfirmation
```

## Overview

Overview By default, the confirmation dialog includes a “Close” button (which closes the scene) and a “Cancel” button (which keeps the scene open). You can replace either of these default buttons by providing custom actions. Use a UIAlertAction with style .destructive to replace the “Close” button, or style .cancel to replace the “Cancel” button. Example: A property of this type is found on UIWindowScene. A scene setting its closureConfirmation may look something like let closeAction = UIAlertAction(title:"End meeting for all", style:.destructive, handler: nil) let cancelAction = UIAlertAction(title:"Stay in meeting", style:.cancel, handler:nil) let myAction = UIAlertAction(title:"Leave & Assign new host", style:.default) { action in    // work to do before the window closes } var closureConfirmation: UISceneClosureConfirmation =    UISceneClosureConfirmation(title:"Leave or End meeting?",                               message:"You are the host. Would you like to end the meeting for all participants?",                               actions:[closeAction, cancelAction, myAction])

windowScene.closureConfirmation = closureConfirmation With this property set, upon user initiated close, the system will present the closure confirmation dialog.

## Topics

### Initializers

- [init(coder:)](uikit/uisceneclosureconfirmation/init(coder:).md)
- [init(title:message:actions:)](uikit/uisceneclosureconfirmation/init(title:message:actions:).md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
