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

# invalidateDetents()

Notifies the sheet to re-evaluate its detent value in the next layout pass.

```
func invalidateDetents()
```

## Discussion

When an external input (like a captured property) to a custom detent changes, call this method to notify the sheet to re-evaluate the detent.

To animate custom detents to their new heights, call this method within [`animateChanges(_:)`](/documentation/UIKit/UISheetPresentationController/animateChanges(_:)).

> Note:
> You don’t need to call this method if ``doc://com.apple.uikit/documentation/UIKit/UISheetPresentationController/detents`` only contains system detents, or if your custom detents only use information from the passed-in context.

---

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)