Instance Property

preferredContentSize

The preferred size for the container’s content.

Required.

Declaration

var preferredContentSize: CGSize { get }

Discussion

The UIViewController class implements a writable version of this property.

See Also

Responding to Changes in Child View Controllers

func size(forChildContentContainer: UIContentContainer, withParentContainerSize: CGSize) -> CGSize

Returns the size of the specified child view controller’s content.

Required.

func preferredContentSizeDidChange(forChildContentContainer: UIContentContainer)

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

Required.

func systemLayoutFittingSizeDidChange(forChildContentContainer: UIContentContainer)

Notifies the container that a child view controller was resized using auto layout.

Required.