<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISheetPresentationControllerDelegate/sheetPresentationControllerDidChangeSelectedDetentIdentifier(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UISheetPresentationControllerDelegate(im)sheetPresentationControllerDidChangeSelectedDetentIdentifier:"
  },
  "title" : "sheetPresentationControllerDidChangeSelectedDetentIdentifier(_:)"
}
-->

# sheetPresentationControllerDidChangeSelectedDetentIdentifier(_:)

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

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

## Parameters

`sheetPresentationController`

The sheet presentation controller whose detent changes.

## 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`](/documentation/UIKit/UISheetPresentationController/selectedDetentIdentifier) changes in response to user interaction. The system doesn’t call this after you change [`selectedDetentIdentifier`](/documentation/UIKit/UISheetPresentationController/selectedDetentIdentifier) programmatically.

---

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)