-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Hi, thanks for the library, works great.
I've a request, I've two column setup like below. On changing height of an item, only that column height should get updated without affecting the adjacent column. How can we do that?
Thanks again
private func setupCollectionView() {
let configuration = WaterfallTrueCompositionalLayout.Configuration(
columnCount: 2,
interItemSpacing: 0,
contentInsetsReference: .automatic,
itemCountProvider: { [unowned self] in
return self.items
},
itemHeightProvider: { [unowned self] row, _ in
if let currentValue = expandedIndexes[row], currentValue {
return self.cardHeight*2
}
return self.cardHeight
}
)
let layout = UICollectionViewCompositionalLayout { sectionIndex, environment in
let section = WaterfallTrueCompositionalLayout.makeLayoutSection(
config: configuration,
environment: environment,
sectionIndex: sectionIndex
)
return section
}
collectionView.setCollectionViewLayout(layout, animated: true)
collectionView.delegate = self
collectionView.dataSource = self
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels