SheetPresenter
@MainActor
public struct SheetPresenter : ViewModifier
This SwiftUI ViewModifier manages the presentation of a sheet.
-
Configures a SwiftUI sheet’s presentation.
Declaration
Swift
@State @MainActor public var sheetPresentation: any SheetPresentationConfiguring { get nonmutating set } -
The SwiftUI sheet to present.
Declaration
Swift
@MainActor public var sheet: (any Sheetable)? { get } -
The initializer.
Declaration
Swift
@MainActor public init(presentation: any SheetPresentationConfiguring)Parameters
presentationA model that configures a SwiftUI sheet’s presentation.
-
A
Viewbody which presents the sheet.Declaration
Swift
@MainActor public func body(content: Content) -> some View -
Updates the sheet being presented.
Declaration
Swift
@MainActor public func updateSheet(_ sheet: any Sheetable) -
Dismisses the sheet that’s currently presented.
Declaration
Swift
@MainActor public func dismissSheet()
View on GitHub