<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISheetPresentationController/selectedDetentIdentifier",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISheetPresentationController(py)selectedDetentIdentifier"
  },
  "title" : "selectedDetentIdentifier"
}
-->

# selectedDetentIdentifier

The identifier of the most recently selected detent.

```
var selectedDetentIdentifier: UISheetPresentationController.Detent.Identifier? { get set }
```

## Discussion

This property represents the most recent detent that the user selects or that you set programmatically. The default value is `nil`, which means the sheet displays at the smallest detent you specify in [`detents`](/documentation/UIKit/UISheetPresentationController/detents).

---

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)