v-circle-o Created with Sketch.

Autolayout: Content hugging VS Content compression resistance priority

We have properties to set content according to content length and device screen size which help us to manage user interface of an application. Content hugging priority and content compression resistance priority helps you to maintain User interface of application.
Let have an example : Place a button with top , leading , trailing and central horizontal constraint.

Alina Aidan
Created by Alina Aidan (User Generated Content*)User Generated Content is not posted by anyone affiliated with, or on behalf of, Playbuzz.com.
On Mar 20, 2017
Help Translate This Item

Autolayout

Hi All,
We have properties to set content according to content length and device screen size which help us to manage user interface of an application. Content hugging priority and content compression resistance priority helps you to maintain User interface of application.
Let have an example : Place a button with top , leading , trailing and central horizontal constraint.
1) Leading constraint priority :- 1000      Trailing constraint priority :- 1000
Content hugging priority :- Horizontal : 250 Vertical : 250
Content compression resistance priority :- Horizontal : 750 Vertical : 750
 

Continue your reading here>> Content hugging VS Content compression resistance priority

These are 10 of the World CRAZIEST Ice Cream Flavors
Created by Tal Garner
On Nov 18, 2021
SIGN UP TO PLAYBUZZ
Join our email list and receive super fun quizzes!
Don't worry. We don't spam.

LIFESTYLE