---
title: "sheetPresentationControllerDidChangeSelectedDetentIdentifier(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uisheetpresentationcontrollerdelegate/sheetpresentationcontrollerdidchangeselecteddetentidentifier(_:)"
---

# sheetPresentationControllerDidChangeSelectedDetentIdentifier(_:)

Provides an opportunity to respond after the sheet presentation controller’s selected detent changes.

## Declaration

```swift
optional func sheetPresentationControllerDidChangeSelectedDetentIdentifier(_ sheetPresentationController: UISheetPresentationController)
```

## Parameters

- `sheetPresentationController`: The sheet presentation controller whose detent changes.

## Discussion

Discussion Implement this method if you want to perform changes in response to the user resizing a sheet to a new detent. The system calls this method after a sheet’s selectedDetentIdentifier changes in response to user interaction. The system doesn’t call this after you change selectedDetentIdentifier programmatically.
