Aug 25, 2015:  ~ 45 sec read

Content hugging and compression resistance

Even though the names might sound self-explanatory, I never really understood how they work. But I finally found a proper explanation about them:

A strong hugging priority limits the view from growing much larger than the content it presents. A weak priority may allow a view to stretch and isolate its content among a sea of padding. Compression resistance describes how a view attempts to maintain its minimum intrinsic content size.

I'm considering to buy the book too, while I'm at it.

Update, 2015-09-16: This piece is really, really nice as well. As he points out:

When I first started out, I actually wish I could have had something like this guide to help me out.

Subscribe to my monthly newsletter.
No spam, unsubscribe at any time.