Instance Method

sizeThatFits(in:)

Calculates and returns the most appropriate size for the current view.

Declaration

func sizeThatFits(in size: CGSize) -> CGSize

Parameters

size

The proposed new size for the view.

Return Value

The size that offers the best fit for the root view and its contents.