resolvedValue(in:)
Resolves a detent to its value.
Declaration
@MainActor @preconcurrency func resolvedValue(in context: any UISheetPresentationControllerDetentResolutionContext) -> CGFloat?Parameters
- context:
A context for resolving custom detent values. This context is available in the
resolverclosure of Custom(identifier:resolver:).
Return Value
A CGFloat that represents the value of the detent, or nil if the detent is inactive in the provided context.
Discussion
You can use this method to get the values of the system medium and large detents, or the value of a custom detent. Use this method inside custom(identifier:resolver:) to construct a custom detent according to the values of known detents.