reservedLayoutSize
The layout size that the system reserves for the image, and then centers the image within.
Declaration
@property (nonatomic) CGSize reservedLayoutSize;Discussion
Use this property to ensure:
Consistent horizontal alignment for images across adjacent content views, even when the images vary in width.
Consistent height for content views, even when the images vary in height.
The reserved layout size only affects the amount of space for the image, and its positioning within that space. It doesn’t affect the size of the image.
The default value is CGSizeZero. A width or height of zero means that the system uses the default behavior for that dimension:
The system centers symbol images inside a predefined reserved layout size that scales with the content size category.
Nonsymbol images use a reserved layout size equal to the actual size of the displayed image.
At Accessibility Dynamic Type sizes, content views ignore the reserved layout width. Content views ignore the reserved layout height when using the special Accessibility Dynamic Type layout where text wraps around the image.