Contents

overrideTraitCollection(forChild:)

Retrieves the trait collection for a child view controller.

Declaration

func overrideTraitCollection(forChild childViewController: UIViewController) -> UITraitCollection?

Parameters

  • childViewController:

    The view controller who’s trait collection is to be returned.

Return Value

The trait collection for the designated view controller.

Discussion

Use this method to retrieve the trait collection for a child view controller. You can then modify the trait collection for the designated child view controller and set it using the setOverrideTraitCollection(_:forChild:) method.

See Also

Deprecated methods