Instance Property


Returns a Boolean value indicating whether appearance methods are forwarded to child view controllers.


var shouldAutomaticallyForwardAppearanceMethods: Bool { get }

Return Value

true if appearance methods are forwarded or false if they are not.


This method is called to determine whether to automatically forward appearance-related containment callbacks to child view controllers.

The default implementation returns true. Subclasses of the UIViewController class that implement containment logic may override this method to control how these methods are forwarded. If you override this method and return false, you are responsible for telling the child when its views are going to appear or disappear. You do this by calling the child view controller'€™s beginAppearanceTransition(_:animated:) and endAppearanceTransition() methods.

See Also

Managing Child View Controllers in a Custom Container

var children: [UIViewController]

An array of view controllers that are children of the current view controller.

func addChild(UIViewController)

Adds the specified view controller as a child of the current view controller.

func removeFromParent()

Removes the view controller from its parent.

func beginAppearanceTransition(Bool, animated: Bool)

Tells a child controller its appearance is about to change.

func endAppearanceTransition()

Tells a child controller its appearance has changed.

func setOverrideTraitCollection(UITraitCollection?, forChild: UIViewController)

Changes the traits assigned to the specified child view controller.

func overrideTraitCollection(forChild: UIViewController) -> UITraitCollection?

Retrieves the trait collection for a child view controller.

class let hierarchyInconsistencyException: NSExceptionName

Raised if the view controller hierarchy is inconsistent with the view hierarchy.