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
setOverrideTraitCollection(_:forChild:)attemptRotationToDeviceOrientation()registerForPreviewing(with:sourceView:)unregisterForPreviewing(withContext:)canPerformUnwindSegueAction(_:from:withSender:)didRotate(from:)dismissMoviePlayerViewControllerAnimated()forUnwindSegueAction(_:from:withSender:)presentMoviePlayerViewControllerAnimated(_:)rotatingFooterView()rotatingHeaderView()segueForUnwinding(to:from:identifier:)shouldAutomaticallyForwardRotationMethods()willAnimateRotation(to:duration:)willRotate(to:duration:)