OverlayWindowPresenter
@MainActor
public final class OverlayWindowPresenter
A singleton class responsible for managing a separate UIWindow
to display an overlay alert on top of all views, including modals.
-
Undocumented
Declaration
Swift
@MainActor public init() -
Returns true when there is already an overlay currently being shown, otherwise false.
Declaration
Swift
@MainActor public var isOverlayAlertVisible: Bool { get } -
Displays an overlay alert by creating a new
UIWindowand setting a SwiftUI view as its root.Does nothing if there is already an overlay alert active.
Declaration
Swift
@MainActor public func present(view: some View)Parameters
viewThe SwiftUI
Viewto be displayed as an overlay. -
Same as
presentOverlayWindow(view:), but with aViewBuilderto accept in-line view creation.Declaration
Swift
@MainActor public func present(@ViewBuilder content: () -> some View)Parameters
contentThe SwiftUI
Viewto be displayed as an overlay. -
Dismisses the currently displayed overlay alert and removes the temporary window.
Declaration
Swift
@MainActor public func dismiss()
View on GitHub