intrinsicContentSize in iOS

Pawan Manjani
Apr 24, 2021

What is intrinsicContentSize?

Apple says: The natural size for the receiving view, considering only properties of the view itself.

In simple words, it is the minimum size that UI Control needs to display.

Image from

Confused??? Let me give a simple example

This is my current code

So here intrinsicContentSize will help us now

Image from

Note: View like UIStackView and UIView has no intrinsic content size because they are dependent on their subview.

For more visit:

Thanks for reading, Happy Coding 💻