You display a modal presentation, like an alert, popover, sheet, or confirmation dialog to draw attention to an important narrowly scoped task. Depending on the platform, you might use different components to present these types of modal experiences.
In SwiftUI you use presentation modifiers to show different kinds of modal presentations. You don’t call a method at the moment you want to present the modal. Rather, you define how the presentation looks and the condition under which SwiftUI should present it.
An alert gives people critical information they need right away.
A popover is a transient view that appears above other content onscreen when people click or tap a control or interactive area. Reserve popovers for wide views; for compact views, use all available screen space by presenting information in a full-screen modal view like a sheet instead.
A sheet helps people perform a scoped task that’s closely related to their current context.
An action sheet is a modal view that presents choices related to an action people initiate.