added compression/hugging
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
d22a7a12b6
commit
17883b7853
@ -24,6 +24,8 @@ final class BreadcrumbCellItem: UICollectionViewCell {
|
|||||||
$0.distribution = .fill
|
$0.distribution = .fill
|
||||||
$0.alignment = .fill
|
$0.alignment = .fill
|
||||||
$0.spacing = VDSLayout.Spacing.space1X.value
|
$0.spacing = VDSLayout.Spacing.space1X.value
|
||||||
|
$0.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
|
||||||
|
$0.setContentHuggingPriority(.defaultHigh, for: .horizontal)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -67,6 +69,8 @@ final class BreadcrumbCellItem: UICollectionViewCell {
|
|||||||
//update surface
|
//update surface
|
||||||
separator.surface = surface
|
separator.surface = surface
|
||||||
breadCrumbItem.surface = surface
|
breadCrumbItem.surface = surface
|
||||||
|
breadCrumbItem.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
||||||
|
breadCrumbItem.setContentHuggingPriority(.defaultLow, for: .horizontal)
|
||||||
|
|
||||||
//remove previous views
|
//remove previous views
|
||||||
stackView.arrangedSubviews.forEach { $0.removeFromSuperview() }
|
stackView.arrangedSubviews.forEach { $0.removeFromSuperview() }
|
||||||
@ -79,7 +83,6 @@ final class BreadcrumbCellItem: UICollectionViewCell {
|
|||||||
//update separator
|
//update separator
|
||||||
separator.textColor = textColorConfiguration.getColor(surface)
|
separator.textColor = textColorConfiguration.getColor(surface)
|
||||||
separator.isHidden = hideSlash
|
separator.isHidden = hideSlash
|
||||||
|
|
||||||
self.breadCrumbItem = breadCrumbItem
|
self.breadCrumbItem = breadCrumbItem
|
||||||
layoutIfNeeded()
|
layoutIfNeeded()
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user