PresentationDetent.swift 586 B

12345678910111213141516171819
  1. /// Represents the available detents (heights) for a sheet presentation.
  2. public enum PresentationDetent: Sendable, Hashable {
  3. /// A detent that represents a medium height sheet.
  4. case medium
  5. /// A detent that represents a large (full-height) sheet.
  6. case large
  7. /// A detent at a custom fractional height (between 0 and 1) of the
  8. /// available space.
  9. ///
  10. /// Falls back to ``medium`` on iOS 15.
  11. case fraction(Double)
  12. /// A detent at a specific fixed height in points.
  13. ///
  14. /// Falls back to ``medium`` on iOS 15.
  15. case height(Double)
  16. }