<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISheetPresentationControllerDetentResolutionContext",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UISheetPresentationControllerDetentResolutionContext"
  },
  "title" : "UISheetPresentationControllerDetentResolutionContext"
}
-->

# UISheetPresentationControllerDetentResolutionContext

A context for resolving custom detent values.

```
@MainActor protocol UISheetPresentationControllerDetentResolutionContext : NSObjectProtocol
```

## Overview

A context of this type is available in the `resolver` closure of [`custom(identifier:resolver:)`](/documentation/UIKit/UISheetPresentationController/Detent/custom(identifier:resolver:)) (Swift) or  [`customDetentWithIdentifier:resolver:`](/documentation/UIKit/UISheetPresentationControllerDetent/customDetentWithIdentifier:resolver:) (Objective-C).

## Topics

### Accessing the properties of the context

[`var containerTraitCollection: UITraitCollection`](/documentation/UIKit/UISheetPresentationControllerDetentResolutionContext/containerTraitCollection)

The trait collection of the sheet’s container view.

[`var maximumDetentValue: CGFloat`](/documentation/UIKit/UISheetPresentationControllerDetentResolutionContext/maximumDetentValue)

The maximum value of a detent.

## Relationships

### Inherits From

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

---

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)