---
title: "fullScreenCover(item:onDismiss:content:)"
framework: swiftui
role: symbol
role_heading: Instance Method
path: "swiftui/view/fullscreencover(item:ondismiss:content:)"
---

# fullScreenCover(item:onDismiss:content:)

Presents a modal view that covers as much of the screen as possible using the binding you provide as a data source for the sheet’s content.

## Declaration

```swift
nonisolated func fullScreenCover<Item, Content>(item: Binding<Item?>, onDismiss: (() -> Void)? = nil, @ContentBuilder content: @escaping (Item) -> Content) -> some View where Item : Identifiable, Content : View

```

## Parameters

- `item`: A binding to an optional source of truth for the sheet. When item is non-nil, the system passes the contents to the modifier’s closure. You display this content in a sheet that you create that the system displays to the user. If item changes, the system dismisses the currently displayed sheet and replaces it with a new one using the same process.
- `onDismiss`: The closure to execute when dismissing the modal view.
- `content`: A closure returning the content of the modal view.

## Discussion

Discussion Use this method to display a modal view that covers as much of the screen as possible. In the example below a custom structure — CoverData — provides data for the full-screen view to display in the content closure when the user clicks or taps the “Present Full-Screen Cover With Data” button: struct FullScreenCoverItemOnDismissContent: View {     @State private var coverData: CoverData?

var body: some View {         Button("Present Full-Screen Cover With Data") {             coverData = CoverData(body: "Custom Data")         }         .fullScreenCover(item: $coverData,                          onDismiss: didDismiss) { details in             VStack(spacing: 20) {                 Text("\(details.body)")             }             .onTapGesture {                 coverData = nil             }         }     }

func didDismiss() {         // Handle the dismissing action.     }

}

struct CoverData: Identifiable {     var id: String {         return body     }     let body: String }

## See Also

### Showing a sheet, cover, or popover

- [sheet(isPresented:onDismiss:content:)](swiftui/view/sheet(ispresented:ondismiss:content:).md)
- [sheet(item:onDismiss:content:)](swiftui/view/sheet(item:ondismiss:content:).md)
- [fullScreenCover(isPresented:onDismiss:content:)](swiftui/view/fullscreencover(ispresented:ondismiss:content:).md)
- [popover(item:attachmentAnchor:arrowEdge:content:)](swiftui/view/popover(item:attachmentanchor:arrowedge:content:).md)
- [popover(isPresented:attachmentAnchor:arrowEdge:content:)](swiftui/view/popover(ispresented:attachmentanchor:arrowedge:content:).md)
- [PopoverAttachmentAnchor](swiftui/popoverattachmentanchor.md)
