UIViewController

public extension UIViewController

Helper methods for UIViewController.

  • Returns an optional with the top-level UIViewController.

    Date

    February 17, 2016

    Declaration

    Swift

    class var topViewController: UIViewController? { get }

    Return Value

    The active UIViewController, if it can be found.

  • The top-level UIViewController within the hierarchy of self‘s stack.

    Date

    February 17, 2016

    Declaration

    Swift

    var topViewController: UIViewController? { get }