Questions tagged [uicollectionviewcompositionallayout]
206 questions
0
votes
1 answer
UICollectionViewCompositionalLayout section clipping
I'm making an UICollectionViewCompositionalLayout with orthogonalScrollingBehavior sections.
I would like to clip them section based so that I can have different insets for clipping, or at best clip them at the NSCollectionLayoutDecorationItem level…

dziobaczy
- 891
- 9
- 17
0
votes
1 answer
UICollectionView compositional layout with orthogonal scrolling and a different size for last cell
We’re attempting to use UICollectionView compositional layout to describe a section layout, but it’s giving us some trouble.
What we’d like to achieve:
A total of 7 cells
3 cells stacked, each 30% height and 100% width, with orthogonal scrolling to…

Mattio
- 2,014
- 3
- 24
- 37
0
votes
1 answer
Crash while using UICollectionViewCompositionalLayout with pinned header views to the layout
I've been noticing a crash with UICollectionViewCompositionalLayout while adding a sticky header to the collection view using NSCollectionLayoutBoundarySupplementaryItem through UICollectionViewCompositionalLayoutConfiguration.
These grid view…

Prasad
- 166
- 7
0
votes
1 answer
UICollectionView with Compositional Layout disappears cells with frame still on screen
Trying to get a "sticky header" that will orthogonally scroll with the section, but only partially, leaving the trailing end exposed until scrolled backwards.
Headers don't work as they don't scroll, so I've decided to just make it work as another…

nickneedsaname
- 731
- 1
- 5
- 22
0
votes
0 answers
iOS - UICollection view with resizable cells on scroll with CompositionalLayout
I need a collection view with cells that are resizing on scroll as in the screen recording.
I can do this with Flow layout, but have no idea how can I achieve this behaviour with Compositional layout?

Marta Paniti
- 152
- 6
0
votes
1 answer
How to autosize the cells in NSCollectionLayoutGroup.custom(layoutSize:) in UICollectionViewCompositionalLayout?
Image of Alignment that is to be done
The need is to right align and center align the collection view cells using UICollectionViewCompositionalLayout which I thought could be achieved by using NSCollectionLayoutGroup.custom(layoutSize:) where we can…

Lakshmi C
- 31
- 8
0
votes
1 answer
Center alignment in one NSCollectionLayoutSection
I'm curious to know, can I achieve this alignment in only one NSCollectionLayoutSection.
Image
My code for the section is:
private func createHeaderTagsSection(using section: Section) -> NSCollectionLayoutSection {
let itemSize =…

Mike Mikey
- 3
- 1
0
votes
1 answer
UICollectionView - groups
This is just a conceptual question about UICollectionViewCompositionalLayout.
I am working on an app that has a view in it that is very similar to the AppStore's "All Reviews" page and I am planning on implementing this with a compositional layout,…

ashipma
- 423
- 5
- 15
0
votes
0 answers
Compositional layout horizontal groups that don't fill all available space
Using UICollectionViewCompositionalLayout, I'd like to achieve a design where row 1 (group 1) contains 1 .fractionalWidth(0.5) item (fills half the horizontal space) and row 2 contains 3 items, each .fractionalWidth(0.33333) (3 items that fill all…

blkhp19
- 482
- 1
- 5
- 13
0
votes
0 answers
UICollectionView header doesn't change it's direction from left to right when I change the language but it works only when relaunching the app
I've created header using UICollectionViewComposotionalLayout like below
//header
let headerSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1), heightDimension: .absolute(30))
let header =…

abdallah eslah
- 85
- 7
0
votes
1 answer
Nested UICollectionView with UICollectionViewCompositionalLayout
I have two UICollectionViews, UICV1 which has UICV2 nested within one of its cells. What I want is that UICV2 self-sizes according to its content, but both the contentSize and collectionViewLayout.collectionViewContentSize is zero.
This exact same…

aplr
- 320
- 1
- 8
0
votes
1 answer
How to modify item shape of specific group when using UICollectionViewCompositionalLayout
I am making a collage app for that I will be using multiple grid layouts.I am using UICollectionViewCompositionalLayout to create grids. One of my grids requires a heart shaped cell in between. Following is my code the HeartShaped item needs to be…

Omair Khan
- 3
- 4
0
votes
1 answer
The header section in UICollectionView when using UIColelctionViewCompositionalLayout is not attached to the top of the screen
When I created the section header I put collectionView there and I want it to attach to the navigation bar when scrolling, I did this through pinToVisibleBounds. The header is attached as I wanted, but when scrolling, going through 1 cell it…

Egor
- 1
- 1
0
votes
0 answers
UICollectionViewCell still being configured when visible
I am modally presenting a UICollectionView using a UICollectionViewCompositionalLayout. The result I desire of one particular section of the CompositionalLayout is effectively the same behaviour as a UITableView. This section is of course used in…

Ben
- 1
- 1
- 2
0
votes
1 answer
UICollectionViewCompositionalLayout section content insets bug
I'm noticing a buggy behaviour for the UICollectionViewCompositional layout when dealing with big content insets inside orthogonal sections.
Consider this simple layout
let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1),…

alfogrillo
- 519
- 5
- 15