Contents

preferredContentSizeDidChange(forChildContentContainer:)

Notifies an interested controller that the preferred content size of one of its children changed.

Declaration

func preferredContentSizeDidChange(forChildContentContainer container: any UIContentContainer)

Parameters

  • container:

    The child view controller whose preferred content size has changed.

Discussion

UIKit calls this method on a container view controller when the preferredContentSize property of one of its child view controllers changes. Similarly, if the view controller is managed by a presentation controller, UIKit calls this method on the presentation controller to let it know of the change. The parent view controller or presentation controller can use this method to initiate layout adjustments based on the new size information.

See Also

Responding to changes in child view controllers