Questions tagged [uicollectionviewcompositionallayout]

117 questions
17
votes
4 answers

UICollectionViewCompositionalLayout bug on iOS 14.3

I'm experiencing a weird layout issue on iOS 14.3 with collection views using a UICollectionViewCompositionalLayout combined in my case with the UICollectionViewDiffableDataSource. The issue is about the wrong position of the inner…
6
votes
1 answer

How to create a grid layout with equal row heights using UICollectionViewCompositionalLayout

I've successfully been able to create a grid layout using UICollectionViewCompositionalLayout. However, I am unable to find a clever way of ensuring the UICollectionViewCell in each row in the grid are of the same height when their heights are…
5
votes
1 answer

UICollectionView for non-grid or semi-grid layout

I am trying to implement a multi-row sequence of items (like Video editing sequence in Final Cut Pro or Adobe Premiere pro shown below). While I one can always implement it using UIScrollView and placing custom views manually, it would be tedious…
5
votes
1 answer

Compositional Layout IOS 13 Group background color

I was trying to find if there is an approach we can use to give background color to a group while using compositional layout. I tried to find a direct API that i can use but didn't find anything.
suraj
  • 294
  • 2
  • 14
4
votes
1 answer

Can make this layout with a UICollectionViewCompositionalLayout

I am trying to create a 'tag cloud' section using a UICollectionViewCompositionalLayout I would like a full width section of items followed by a section that wraps in this fashion Essential HR, Financial Wellbeing and Employee engagement would each…
4
votes
1 answer

Collection View Diffable Data Source cells disappearing and not resizing properly?

I'm having a really weird issue with my collection view. I'm using the Compositional Layout and Diffable Data Source APIs for iOS 13+, but I'm getting some really weird behavior. As seen in the video below, when I update the data source, the first…
4
votes
0 answers

UICollectionViewCompositionalLayout's sticky header is jerky

I am trying to use the latest UICollectionViewCompositionalLayout to display paginated data using the UICollectionViewDiffableDataSource . I wanted to show a sticky header above the section that would stay on the top always even while loading the…
4
votes
0 answers

UICollectionView Compositional Layout header with pinToVisibleBounds is strangely obscured by cells

I am using UICollectionView Compositional Layout and want to have a header that is sticking to the top this should be possible with header.pinToVisibleBounds = true however, during scrolling, the header gets strangely obscured, looking like a…
3
votes
2 answers

collectionview global header does not push cells down and stays on top instead

I have a collection view header (blue) and cells (red). I want to be able to show/hide header programmatically, however when I show the header programatically it appears on top of the cell (or makes scrollview go down a bit). I would like the header…
3
votes
0 answers

Dynamic-Sized Header in a CollectionView with Compositional Layout

I have a collection view powered by compositional layout + diffable data source. It uses three supplementary boundary items: a header, footer, and "leading-header". App Layout Example The problem is: fractional size for leading headers is based on…
3
votes
1 answer

UICollectionViewCompositionalLayout incorrect item size

I'm currently facing an issue with compositional layout which can also be seen in Apple's example -> ConferenceNewsFeedViewController. The item height is set to .estimated(100) and the width is set to .fractionalWidth(1.0). On the initial display…
3
votes
0 answers

UICollectionViewCompositionalLayout orthogonal section willDisplayCell analytics

I'm using Collection View Compositional Layout and need to have accurate analytics for "userViewedCell" events for orthogonally scrolling sections. I had been using collectionView(willDisplay:forItemAt) to detect when a cell is about to be shown,…
3
votes
0 answers

UICollectionViewCompositionalLayout + UICollectionViewDiffableDataSource: is there a way to change a decoration view depending on section data?

I have a UICollectionView that uses UICollectionViewCompositionalLayout and UICollectionViewDiffableDataSource and it works fine. Cells are provided by a cellProvider defined in the initialiser of the datasource. The provider returns cells with…
3
votes
0 answers

UICollectionViewCompositionalLayout is it possible to create a PinterestLayout?

Can i use UICollectionViewCompositionalLayout to create a Pinterest / Waterflow like layout? the closes was with func buildLayout() -> UICollectionViewCompositionalLayout { // cells let itemSize = NSCollectionLayoutSize(widthDimension:…
3
votes
1 answer

How to deal with inconsistent behavior when change snapshot animatedDifferences value?

I'll start with explanation how things suppose to work: I have collection view with compositional layout and diffable data source. Cells are representing tasks, which user can click on and set as done for today, cells have different appearance…
1
2 3 4 5 6 7 8