sizeThatFits(_:)
Returns the size of the view that will render the shape, given a proposed size.
Declaration
nonisolated func sizeThatFits(_ proposal: ProposedViewSize) -> CGSizeParameters
- proposal:
A size proposal for the container.
Return Value
A size that indicates how much space the shape needs.
Discussion
Implement this method to tell the container of the shape how much space the shape needs to render itself, given a size proposal.
See sizeThatFits(proposal:subviews:cache:) for more details about how the layout system chooses the size of views.