1.sizeclasses can limit what kind of screen a storyboard appears on, such as whether the current storyboard is displayed on the left oblique right of the iphone or on the ipad.
The 2.Hug value represents the tensile priority, and the Compressionresistance value represents the anti-compression priority level. These two priority and width priorities are compared together .....
If the UILabel width constraint is too small, but too much content, it will certainly stretch ..... If the priority of the width constraint is less than the anti-compression priority, it will be stretched first ....
For example, the size of the picture itself is 133*133, the compression priority compressionresistance is 750, and the explicit width constraint is 120 priority 1000. Because the display width priority is greater than the anti-stress priority, the final picture width is 120. However, when we lower the precedence of an explicit width constraint, which is less than the stress priority, it is dominated by its own width of 133.
(PS: The size of the hug and width constraint precedence can be compared only, or the size of the compressionresistance and width constraint precedence, and the size of hug and compressionresistance cannot be compared.)
IOS Automatic Layout Summary