One Logo Pool Ball
SwiftUI · IOS API REFERENCE

PresentationDetent

struct · iOS 16.0+ · SDK 27.1

struct PresentationDetent

A type that represents a height where a sheet naturally rests.

Members (4)

get · iOS 16.0+

large

TypeScript
static get large(): PresentationDetent
Swift declaration
static let large: PresentationDetent

The system detent for a sheet at full height.

static · iOS 16.0+

height

TypeScript
static height(height: number): PresentationDetent
Swift declaration
static func height(_ height: CGFloat) -> PresentationDetent

A custom detent with the specified height.

get · iOS 16.0+

medium

TypeScript
static get medium(): PresentationDetent
Swift declaration
static let medium: PresentationDetent

The system detent for a sheet that's approximately half the height of the screen, and is inactive in compact height.

static · iOS 16.0+

fraction

TypeScript
static fraction(fraction: number): PresentationDetent
Swift declaration
static func fraction(_ fraction: CGFloat) -> PresentationDetent

A custom detent with the specified fractional height.

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

PresentationDetent.custom(_:)

Passing a Swift type itself is not supported.

All SwiftUI types →