diff --git a/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift b/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift index 939f7573..bd04304c 100644 --- a/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift +++ b/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift @@ -24,6 +24,8 @@ final class BreadcrumbCellItem: UICollectionViewCell { $0.distribution = .fill $0.alignment = .fill $0.spacing = VDSLayout.Spacing.space1X.value + $0.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal) + $0.setContentHuggingPriority(.defaultHigh, for: .horizontal) } }() @@ -67,7 +69,9 @@ final class BreadcrumbCellItem: UICollectionViewCell { //update surface separator.surface = surface breadCrumbItem.surface = surface - + breadCrumbItem.setContentCompressionResistancePriority(.defaultLow, for: .horizontal) + breadCrumbItem.setContentHuggingPriority(.defaultLow, for: .horizontal) + //remove previous views stackView.arrangedSubviews.forEach { $0.removeFromSuperview() } @@ -79,7 +83,6 @@ final class BreadcrumbCellItem: UICollectionViewCell { //update separator separator.textColor = textColorConfiguration.getColor(surface) separator.isHidden = hideSlash - self.breadCrumbItem = breadCrumbItem layoutIfNeeded() }