Returns the optimal size of the view based on its constraints and the specified fitting priorities.
- iOS 8.0+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
The priority for horizontal constraints. Specify
fittingto get a width that is as close as possible to the width value of
The priority for vertical constraints. Specify
fittingto get a height that is as close as possible to the height value of
The optimal size for the view based on the provided constraint priorities.
Use this method when you want to prioritize the view's constraints when determining the best possible size of the view. This method does not actually change the size of the view.