Skip to content

Commit

Permalink
Resolved bug (missing space at the end of the collectionview when scr…
Browse files Browse the repository at this point in the history
…olling)
  • Loading branch information
Camilla Copetti committed Nov 14, 2024
1 parent 2123156 commit dca9e6a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions NOICommunity/Views/FiltersBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,19 @@ private extension FiltersBarView {
collectionViewLayout: createLayout()
)
collectionView.backgroundColor = .noiSecondaryBackgroundColor
collectionView.translatesAutoresizingMaskIntoConstraints = false
collectionView.showsHorizontalScrollIndicator = false
collectionView.delegate = self
collectionView.allowsMultipleSelection = false

embedSubview(collectionView)

addSubview(collectionView)

NSLayoutConstraint.activate([
collectionView.topAnchor.constraint(equalTo: topAnchor),
collectionView.leadingAnchor.constraint(equalTo: leadingAnchor),
collectionView.trailingAnchor.constraint(equalTo: trailingAnchor),
collectionView.bottomAnchor.constraint(equalTo: bottomAnchor)
])
}

func createLayout() -> UICollectionViewLayout {
Expand Down

0 comments on commit dca9e6a

Please sign in to comment.