0%

约束相关

问题1:The safe area layout guide is the space available to our view, excluding rounded corners and notches.
答案:All important content should lie inside the safe area, or you risk it being obscured.

问题2:layoutMarginsGuide and safeAreaLayoutGuide are the same thing.
答案:Not quite: layoutMarginsGuide is inside the safeAreaLayoutGuide, so it will be slightly smaller.

问题3: Activating multiple constraints at once is faster than modifying isActive for each one.
答案:Apple explicitly recommends using activate() for this purpose.

问题4: Content hugging priority controls how likely Auto Layout is to make a view smaller than its intrinsic content size.
答案:Content hugging priority controls how likely Auto Layout is to make a view larger than its intrinsic content size.