UIViewController

public extension UIViewController
  • Create a UIViewController and embed the trailing closure’s view

    Declaration

    Swift

    convenience init(_ closure: (() -> UIView))
  • Go without the Navigation Controller using the current ViewController to present the new ViewController

    Declaration

    Swift

    func go(
        to viewController: UIViewController,
        style: Navigate.NavigationStyle,
        completion: (() -> Void)? = nil
    )
  • Navigate with the Navigation Controller to the new ViewController

    Declaration

    Swift

    func navigate(
        _ viewController: UIViewController,
        style: Navigate.NavigationStyle,
        completion: (() -> Void)? = nil
    )
  • Create a ViewController with Safe Area

    Declaration

    Swift

    @available(iOS 11.0, *)
    class func safe(_ closure: (() -> UIView)) -> UIViewController