remove previous views in stack

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-03-27 09:47:24 -05:00
parent 4fb1930617
commit 81b4bd3935

View File

@ -68,6 +68,9 @@ final class BreadcrumbCellItem: UICollectionViewCell {
separator.surface = surface
breadCrumbItem.surface = surface
//remove previous views
stackView.arrangedSubviews.forEach { $0.removeFromSuperview() }
//add to stack
stackView.addArrangedSubview(separator)
stackView.addArrangedSubview(breadCrumbItem)