Explore tens of thousands of sets crafted by our community.
iOS Auto Layout Constraints
25
Flashcards
0/25
Equal Widths Constraint
Enforces the same width for two views. Use it when you want multiple elements to share the same width regardless of the device size.
Compression Resistance
Specifies how strongly a view resists being made smaller than its intrinsic content size. Use it to prevent a view from shrinking too much, especially with labels and buttons containing text.
Leading and Trailing Constraints
Defines the spacing to the nearest neighbor or container margin from either the leading (left) or trailing (right) side. Used for supporting right-to-left (RTL) languages as well as left-to-right (LTR).
Less Than or Equal To Constraint
Defines a maximum size or distance for a constraint. Use it when you want to set the largest permissible size or space for a view, containing it within certain bounds.
Left Constraint
Defines the space from the left edge of the view to the left edge of its nearest neighbor or container. Use it for left-side positioning, keeping in mind that it is not affected by RTL languages.
Right Constraint
Defines the space from the right edge of the view to the right edge of its nearest neighbor or container. Use it for right-side positioning, remembering that it won't adapt to RTL languages.
Active and Inactive Constraints
Determines whether a constraint is currently affecting the layout. Constraints can be toggled between active and inactive states to change layouts dynamically.
Bottom Constraint
Defines the space between the bottom edge of the view and the bottom edge of its nearest neighbor or container. Use it for vertical positioning, especially at the bottom of a view hierarchy.
Horizontal Spacing Constraint
Defines the horizontal space between two sibling views or between a view and its container. Use it to manage spacing and distribution of views in the horizontal axis.
Content Hugging
Specifies how strongly a view resists growing larger than its intrinsic content size. Use this property to make a view fit its content closely, avoiding unnecessary blank space.
Aspect Ratio Constraint
Maintains a proportional relationship between a view's width and height. Use it when you want the view to scale in size proportionally.
Center X Constraint
Aligns the center X (horizontal midpoint) of a view with the midpoint of its parent view or another view. Use this to center views horizontally.
Greater Than or Equal To Constraint
Specifies a minimum size or distance for a constraint. Use this when you want to set the least allowable size or space for a view, giving it room to grow as needed.
Priority Constraint
Determines which constraints should be given preference when conflicts arise. Use it to manage the layout behavior when competing constraints are in place.
Multiplier
Defines the ratio used in a constraint relationship, modifying one view's dimension relative to another's. Ideal for making dimensions of views proportional to each other.
Width Constraint
Specifies the width of a view. Use it to set a fixed width or a width relative to another view or view property.
Identifiers
A user-defined name for a constraint that can assist with debugging Auto Layout issues. Use identifiers to easily locate and manage specific constraints within complex layouts.
Center Y Constraint
Aligns the center Y (vertical midpoint) of a view with the midpoint of its parent view or another view. Use this to center views vertically.
Height Constraint
Specifies the height of a view. Use it to set a fixed height or a height relative to another view or view property.
Vertical Spacing Constraint
Defines the vertical space between two sibling views or between a view and its container. Use it to manage spacing and distribution of views in the vertical axis.
First Baseline Constraint
Aligns the top-most line of text in a view with the first baseline of another. Helpful when aligning multi-line texts or different font sizes.
Baseline Constraint
Aligns the text baseline of a view with the baseline of another view. Typically used for aligning text labels or controls that contain text.
Top Constraint
Defines the space between the top edge of the view and the top edge of its nearest neighbor or container. Use it to position views vertically within a parent view or relative to siblings.
Last Baseline Constraint
Aligns the bottom-most line of text in a view with the last baseline of another. Ideal for aligning the last line of multi-line texts.
Safe Area
Represents the portion of the view that is not covered by navigation bars, tab bars, toolbars, and other ancestor views. Use it to place content within the 'safe' visible area of the device.
© Hypatia.Tech. 2024 All rights reserved.