UIView

public extension UIView

These are helper methods to make views go to full screen mode (and back to it’s previous state)

  • Declaration

    Swift

    @MainActor
    func sinIsFullscreen() -> Bool

    Return Value

    true if view is in full screen mode or is about to be (in animation transition).

  • Make view go into full screen mode.

    The view will be moved out of it’s current place in the view hierarchy and will be added as a subview directly in the main UIWindow.

    Declaration

    Swift

    @MainActor
    func sinEnableFullscreen(animated: Bool)
  • Make view go back to it’s original state before full screen mode was enabled.

    The view will be moved back to it’s original superview, and it’s original frame will be restored.

    Declaration

    Swift

    @MainActor
    func sinDisableFullscreen(animated: Bool)