UIViewController
extension UIViewController: ScreenVisibleContainer
extension UIViewController: ScreenPayloadedContainer
-
A Boolean value indicating whether the container is visible.
Returns
true
if controller’s view is loaded and is not hidden.Declaration
Swift
public var isVisible: Bool { get }
-
Declaration
Swift
@available(iOS 13.0, tvOS 13.0, *) public var windowScene: UIWindowScene? { get }
-
The container that presented this container.
When you present a container modally (either explicitly or implicitly) using the
present(_:animated:completion:)
method, the container that was presented has this property set to the container that presented it. If the container was not presented modally, but one of its ancestors was, this property contains the container that presented the ancestor. If neither the current container or any of its ancestors were presented modally, the value in this property isnil
.See also
presentingViewController
Declaration
Swift
public var presenting: UIViewController? { get }
-
The container that is presented by this container, or one of its ancestors in the container hierarchy.
When you present a container modally (either explicitly or implicitly) using the
present(_:animated:completion:)
method, the container that called the method has this property set to the container that it presented. If the current container did not present another view controller modally, the value in this property isnil
.See also
presentedViewController
Declaration
Swift
public var presented: UIViewController? { get }
-
The nearest ancestor in the container hierarchy that is a stack container.
If the container or one of its ancestors is a child of a stack container, this property contains the owning stack container. This property is
nil
if the container is not embedded inside a stack container.See also
navigationController
Declaration
Swift
public var stack: UINavigationController? { get }
-
The nearest ancestor in the container hierarchy that is a tabs container.
If the container or one of its ancestors is a child of a tabs container, this property contains the owning tabs container. This property is
nil
if the container is not embedded inside a tabs container.See also
navigationController
Declaration
Swift
public var tabs: UITabBarController? { get }
-
The window container of this container, or
nil
if it has none.This property is
nil
if the container’s view has not yet been loaded or added to a window.See also
viewIfLoaded
Declaration
Swift
public var window: UIWindow? { get }