iOS — content hugging and content compression resistance priorities

Intrinsic content size (Apple docs)

Content hugging priority:

horizontal content hugging priority: green(251)- blue(251)
horizontal content hugging priority: green(250)- blue(251)
horizontal content hugging priority: green(252)- blue(251)

Content compression resistance priority:

Button horizontal compression resistance priority is 750 and button width constraint priority is 1000
Button horizontal compression resistance priority is 1000 and button width constraint priority is 999

That’s it. !

Comments

Popular Posts