Questions tagged [uicollectionviewcompositionallayout]
206 questions
0
votes
0 answers
swift compositional layout global footer not show when you have a lot of data to scroll through
i use diffableDataSource & Compositional Layout
collectionView If you don't need a lot of scrolling, you can see the global footer well
If you need to scroll a lot, the global footer will not be visible.
But strangely, there are areas where global…

ga-yo
- 123
- 1
- 2
- 11
0
votes
0 answers
Scroll Bar horizontally for each sections collectionView
I want to make visible scrollbar for each sections horizontally in Compositional layout.. Method colletionView.showsVerticalScrollIndicator = true is working for vertical scrolling, colletionView.showsHorizontalScrollIndicator it's probably not for…
0
votes
0 answers
Manipulating frame in layoutAttributesForElements(in rect:) causes contentOffset to jerk
I am trying to apply a kind of reverse-parallax effect on the first cell in my collectionview by overriding the layoutAttributesForElements(in rect:) method on UICollectionViewCompositionalLayout, calling the super implementation to obtain the…

JoGoFo
- 1,928
- 14
- 31
0
votes
0 answers
UICollectionViewCompositionalLayout expand to tallest cell with continuous orthogonal scrolling
I have a section in a collection view with an orthogonal scrolling group. The cell has an 1:1 image, a title label below and two detail labels sticking to the bottom of the cell. All UILabels can be multiline and will have different line count per…

jplabs
- 33
- 1
- 7
0
votes
0 answers
Swift: Accessing sections when using diffable data sources?
I have a collection view with multiple sections and eventually multiple cell types. I've read that we should avoid using indexPath with using diffable data sources. Is the way I currently access sections defeat the purpose of using diffable data…

VAlexander
- 86
- 6
0
votes
1 answer
Show different layout section if collection view section has no data to display
I am trying to implement a collection view that consists of the following sections:
User section: Showing the user's profile info (avatar, email, etc)
Children section: Showing the user's children (if available)
Statistics section: Showing the…

christostsang
- 1,701
- 3
- 27
- 46
0
votes
1 answer
UICollectionView: make first item's width different from the rest
I'm currently trying to achieve the following layout using NSCollectionLayoutSection. Do you have any advice on only making the first item 50px wide while keeping the rest of the items 100px (could be any number of items)? The solution has to be an…

Kirill
- 738
- 10
- 26
0
votes
1 answer
UICollectionViewCompositionalLayout and sectionHeader.pinToVisibleBounds = true
I have collection view with header sticking to top while scrolling. How can I change the colour of header text when particular section reaches to the top of collection view while user scrolling.

QCG
- 2,569
- 3
- 20
- 25
0
votes
0 answers
UICollectionView snapshot takes too long to RE-apply
I have a UICollectionView with a large set of data source, e.g. 30000+ items; And the data source varies depending on screen orientation (ie. portrait, landscape), so I re-create and re-apply the snapshot whenever screen rotates.
What I noticed, is…

Heuristic
- 5,087
- 9
- 54
- 94
0
votes
1 answer
Why is NSCollectionView not loading in Objective-C?
I am learning about NSCollectionView compositional layout on macOS (12.4, Xcode 13.4). In the Swift version of this app everything works as expected, yet when converting it to Objective-C, while I get everything to compile, the app loads as blank.
I…

NotationMaster
- 390
- 3
- 17
0
votes
0 answers
Is it possible to manipulate the spacing between items, groups and sections using UICollectionViewCompositionalLayout.list?
I was using a Collection View and setting the Layout to self.collectionView.collectionViewLayout = setupLayout(), where:
func setupLayout() -> UICollectionViewCompositionalLayout {
let layout = UICollectionViewCompositionalLayout { (sectionNumber,…

Maykon Meneghel
- 335
- 6
- 8
0
votes
1 answer
Is there an equivalent to sizeForItemAt IndexPath but for UICollectionviewCompositionalLayout?
I'm tasked with modifying one of our horizontal collectionViews so that it supports 2 possible cell widths based on the value of one of the properties of the item at that indexPath. This is rather simple to implement using…

Shyne
- 1
- 2
0
votes
0 answers
Is it possible to adapt UIcollectionViewCompositionalLayout for different Sized cells dequeued by diffableDataSource
I have a horizontal scrolling collectionView that I need to modify from dequeuing 1 type of cell, to two types of cell with two different fixed widths (both have the same height but one has a greater width).
I've modified my dataSource to dequeue…

Shyne
- 1
- 2
0
votes
0 answers
How to set a static header for the entire collection view (compositional layout)
I need to set a static header that is common for all sections in the collection view and since I am using a compositional layout, I can't set a common header like that is usually done in the flow layout collection views.
Using…

Dracarys
- 31
- 1
- 9
0
votes
1 answer
How to set the left inset of UICollectionViewListCell text to 0
I created a list by using collection view compositional layout and implemented a default style cell ( please see the picture UICollectionViewListCell
There is a space of 20pt on the left side of the text. The space might be different on different…

P.H.
- 15
- 5