From f25e9af766b216724ae882c8fb27a4e9c3252d6f Mon Sep 17 00:00:00 2001 From: vasavk Date: Wed, 13 Mar 2024 17:50:19 +0530 Subject: [PATCH] Digital ACT-191 ONEAPP-6827 story: minor changes to see form fields --- VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift | 7 +++---- VDS/Components/Breadcrumbs/Breadcrumbs.swift | 9 ++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift b/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift index 91cd9945..74e35961 100644 --- a/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift +++ b/VDS/Components/Breadcrumbs/BreadcrumbCellItem.swift @@ -17,7 +17,6 @@ final class BreadcrumbCellItem: UICollectionViewCell { //-------------------------------------------------- // MARK: - Private Properties //-------------------------------------------------- - internal var stackView: UIStackView = { return UIStackView().with { $0.translatesAutoresizingMaskIntoConstraints = false @@ -70,9 +69,9 @@ final class BreadcrumbCellItem: UICollectionViewCell { contentView.addSubview(stackView) separator.backgroundColor = .clear - stackView.backgroundColor = .red - breadcrumb.backgroundColor = .green - separator.backgroundColor = .yellow +// stackView.backgroundColor = .red +// breadcrumb.backgroundColor = .green +// separator.backgroundColor = .yellow } ///Updating UI based on selected index, current index along with surface diff --git a/VDS/Components/Breadcrumbs/Breadcrumbs.swift b/VDS/Components/Breadcrumbs/Breadcrumbs.swift index 4777d3c6..cfef9936 100644 --- a/VDS/Components/Breadcrumbs/Breadcrumbs.swift +++ b/VDS/Components/Breadcrumbs/Breadcrumbs.swift @@ -76,6 +76,13 @@ open class Breadcrumbs: View { /// Executed on initialization for this View. open override func initialSetup() { super.initialSetup() + + addSubview(containerView) + containerView.pinToSuperView() + //for TEST + containerView.widthAnchor.constraint(greaterThanOrEqualToConstant: 288).activate() + containerView.heightAnchor.constraint(equalToConstant: 150).activate() + containerView.addSubview(collectionView) } /// Resets to default settings. @@ -99,7 +106,7 @@ extension Breadcrumbs: UICollectionViewDelegate, UICollectionViewDataSource, UIC public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { guard let cell = collectionView.dequeueReusableCell(withReuseIdentifier: BreadcrumbCellItem.identifier, for: indexPath) as? BreadcrumbCellItem else { return UICollectionViewCell() } - var showSlash = (indexPath.row == (breadcrumbItems.count - 1)) + let showSlash = (indexPath.row == (breadcrumbItems.count - 1)) cell.update(_selectedPageIndex, currentIndex: indexPath.row, surface: surface, showSlash: showSlash) return cell }