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

# resolvedValueInContext:

Resolves a detent to its value.

```
- (CGFloat) resolvedValueInContext:(id<UISheetPresentationControllerDetentResolutionContext>) context;
```

## Parameters

`context`

A context for resolving custom detent values. This context is available in the `resolver` block of [`customDetentWithIdentifier:resolver:`](/documentation/UIKit/UISheetPresentationControllerDetent/customDetentWithIdentifier:resolver:).

## Return Value

A <doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct> that represents the value of the detent, or [`UISheetPresentationControllerDetentInactive`](/documentation/UIKit/UISheetPresentationControllerDetentInactive) if the detent is inactive in the provided context.

## Discussion

You can use this method to get the values of the system [`medium`](/documentation/UIKit/UISheetPresentationController/Detent/Identifier-swift.struct/medium) and [`large`](/documentation/UIKit/UISheetPresentationController/Detent/Identifier-swift.struct/large) detents, or the value of a custom detent. Use this method inside [`customDetentWithIdentifier:resolver:`](/documentation/UIKit/UISheetPresentationControllerDetent/customDetentWithIdentifier:resolver:) to construct a custom detent according to the values of known 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)