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

# fullScreenCover(isPresented:onDismiss:content:)

Presents a modal view that covers as much of the screen as possible when binding to a Boolean value you provide is true.

## Declaration

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

```

## Parameters

- `isPresented`: A binding to a Boolean value that determines whether to present the sheet.
- `onDismiss`: The closure to execute when dismissing the modal view.
- `content`: A closure that returns the content of the modal view.

## Discussion

Discussion Use this method to show a modal view that covers as much of the screen as possible. The example below displays a custom view when the user toggles the value of the isPresenting binding: struct FullScreenCoverPresentedOnDismiss: View {     @State private var isPresenting = false     var body: some View {         Button("Present Full-Screen Cover") {             isPresenting.toggle()         }         .fullScreenCover(isPresented: $isPresenting,                          onDismiss: didDismiss) {             VStack {                 Text("A full-screen modal view.")                     .font(.title)                 Text("Tap to Dismiss")             }             .onTapGesture {                 isPresenting.toggle()             }             .foregroundColor(.white)             .frame(maxWidth: .infinity,                    maxHeight: .infinity)             .background(Color.blue)             .ignoresSafeArea(edges: .all)         }     }

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

## 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(item:onDismiss:content:)](swiftui/view/fullscreencover(item: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)
