UIViewController

class UIViewController : UIResponder, NSCoding, UIAppearanceContainer, UITraitEnvironment, UIContentContainer, UIFocusEnvironment
  • Add view controller to this as child

    Declaration

    Swift

    public func add(_ child: UIViewController, containerView: UIView? = nil)

    Parameters

    child

    Child view controller

    containerView

    Container view for childVC view. Default root view this view controller

  • Remove this view controller from parent view controller

    Declaration

    Swift

    public func removeFromParent()