Generic Instance Method

sheet(isPresented:onDismiss:content:)

Presents a sheet when a given condition is true.

Declaration

func sheet<Content>(isPresented: Binding<Bool>, onDismiss: (() -> Void)? = nil, @ViewBuilder content: @escaping () -> Content) -> some View where Content : View

See Also

Presenting Additional Views

func sheet<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)?, content: (Item) -> Content) -> View

Presents a sheet using the given item as a data source for the sheet’s content.

func actionSheet(isPresented: Binding<Bool>, content: () -> ActionSheet) -> View

Presents an action sheet when a given condition is true.

func actionSheet<T>(item: Binding<T?>, content: (T) -> ActionSheet) -> View

Presents an action sheet using the given item as a data source for the sheet’s content.