contentHuggingElements
A setting that determines which type of items tightly hug their content.
Declaration
var contentHuggingElements: UICollectionLayoutListConfiguration.ContentHuggingElements { get set }Discussion
The default value of this property is supplementaryHeader in visionOS, and [] on all other platforms.
When the value of this property is supplementaryHeader, header views tightly hug their content. This means header views don’t stretch to fill the width of the collection view if its content’s intrinsic content size is less than the collection view’s width.