UIApplication

public extension UIApplication
  • Returns the UIWindowSceen of the active sceen currently shown to the user.

    Declaration

    Swift

    @MainActor
    var activeWindowScene: UIWindowScene? { get }
  • Returns the currently active window.

    Declaration

    Swift

    @MainActor
    var keyWindow: UIWindow? { get }
  • Applies the given display mode to all windows, overriding the user interface style that way.

    Declaration

    Swift

    @MainActor
    func applyDisplayMode(_ displayMode: UIUserInterfaceStyle)

    Parameters

    displayMode

    The display mode (light, dark, automatic) to apply.

  • Dismisses the keyboard.

    Declaration

    Swift

    @MainActor
    func dismissKeyboard()