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 https://tenor.com

Confused??? Let me give a simple example

This is my current code

So here intrinsicContentSize will help us now

Image from https://tenor.com

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

For more visit: https://ioslifee.blogspot.com

Thanks for reading, Happy Coding 💻

--

--