---
title: selectedDetentIdentifier
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uisheetpresentationcontroller/selecteddetentidentifier
---

# selectedDetentIdentifier

The identifier of the most recently selected detent.

## Declaration

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

## Discussion

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.

## See Also

### Specifying the height

- [detents](uikit/uisheetpresentationcontroller/detents.md)
- [UISheetPresentationController.Detent](uikit/uisheetpresentationcontroller/detent.md)
