27 lines
853 B
Swift
27 lines
853 B
Swift
//
|
|
// BreadcrumbCellItem.swift
|
|
// VDS
|
|
//
|
|
// Created by Kanamarlapudi, Vasavi on 11/03/24.
|
|
//
|
|
|
|
import UIKit
|
|
import VDSCoreTokens
|
|
|
|
///This is customised view for Breadcrumb cell item
|
|
final class BreadcrumbCellItem: UICollectionViewCell {
|
|
|
|
///Identifier for the BreadcrumbCellItem
|
|
static let identifier: String = String(describing: BreadcrumbCellItem.self)
|
|
|
|
///Updating the breadCrumbItem and UI based on the selected flag along with the surface
|
|
func update(breadCrumbItem: BreadcrumbItem) {
|
|
contentView.subviews.forEach{$0.removeFromSuperview()}
|
|
contentView.addSubview(breadCrumbItem)
|
|
breadCrumbItem.pinToSuperView()
|
|
breadCrumbItem.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
|
|
breadCrumbItem.setContentHuggingPriority(.defaultLow, for: .horizontal)
|
|
}
|
|
}
|
|
|