SheetPresentation

public final class SheetPresentation : SheetPresentationConfiguring

Configures the presentation of a SwiftUI sheet.

  • id

    Declaration

    Swift

    public var id: UUID { get set }
  • Declaration

    Swift

    public var sheet: (any Sheetable)? { get set }
  • Declaration

    Swift

    public var systemDismissalClosure: SheetDismissalClosure? { get set }
  • Declaration

    Swift

    public var dismissedClosure: (() -> Void)? { get set }
  • Declaration

    Swift

    public var shouldPresentSheet: Bool { get set }
  • Declaration

    Swift

    public var shouldPresentFullscreen: Bool { get set }
  • Declaration

    Swift

    public var presentationMode: ViewSheetPresentationOptions.PresentationMode { get set }
  • Declaration

    Swift

    public var presentationDetents: Set<PresentationDetent> { get set }
  • Declaration

    Swift

    public var contentInteractionMode: PresentationContentInteraction { get set }
  • Declaration

    Swift

    public var backgroundInteractionMode: PresentationBackgroundInteraction { get set }
  • The initializer.

    Declaration

    Swift

    public init(sheet: (any Sheetable)? = nil, dismissalClosure: (() -> Void)? = nil)

    Parameters

    sheet

    The sheet model to present.

    dismissedClosure

    A closure to be run when a sheet is dismissed.

  • Provides a new sheet

    Declaration

    Swift

    public func updateSheet(_ sheet: (any Sheetable))

    Parameters

    sheet

    A new sheet to be presented.

  • Dismisses the current sheet.

    Declaration

    Swift

    public func dismissSheet()
  • Removes the current sheet, resetting this object to a default state.

    Declaration

    Swift

    public func removeCurrentSheet()
  • Declaration

    Swift

    public static func == (lhs: SheetPresentation, rhs: SheetPresentation) -> Bool