sizeThatFits(in:)
Calculates and returns the most appropriate size for the current view.
Declaration
@MainActor @preconcurrency func sizeThatFits(in size: CGSize) -> CGSizeParameters
- size:
The proposed new size for the view.
Return Value
The size that offers the best fit for the root view and its contents.