Comments (11)
Yes, you can. By having a custom subclass for the Header view for each section
from collectionviewshelflayout.
But the header is on top. Can I put it to the right like this?
from collectionviewshelflayout.
What are those square? Are they a UICollectionViewCell?
from collectionviewshelflayout.
Yes. Those are cells of that section.
from collectionviewshelflayout.
I think in this case, you can have a disclosure indicator a UICollectionViewCell with another cell type with its own cell identifier and return it from the cellForItem method.
from collectionviewshelflayout.
That will make it scrollable. I want it to stay at the right.
from collectionviewshelflayout.
from collectionviewshelflayout.
I see. I'm afraid that this library doesn't support this scenario out of the box but you can fork this project and make a change to make it support your scenario
from collectionviewshelflayout.
Thank you for your work. Do you have any suggestion for that?
from collectionviewshelflayout.
You can add a new kind of supplementary view for the detail disclosure (and may also with a custom Layout Attribute) and layout it in prepareLayout method similar to https://github.com/pitiphong-p/CollectionViewShelfLayout/blob/master/CollectionViewShelfLayout/CollectionViewShelfLayout.swift#L178-L186 and also return in the layoutAttributesForElements(in:) and layoutAttributesForSupplementaryView(ofKind:at:) methods
from collectionviewshelflayout.
Or if you set the deployment target at iOS 13 then you may try the new https://developer.apple.com/documentation/uikit/uicollectionviewcompositionallayout as presented in https://developer.apple.com/videos/play/wwdc2019/215/
from collectionviewshelflayout.
Related Issues (12)
- Centered Paging (snap cell to center) HOT 2
- If I can have sectionHeadersPinToVisibleBounds properties HOT 1
- Hiding Some Section Headers HOT 1
- ScrollView stop scrolling on tap
- Headers not updating when on `insertSections`
- reload collection
- Great job! HOT 13
- Cell size dynamically HOT 8
- Different sizes for different rows HOT 4
- Bad instruction HOT 4
- cells not appearing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collectionviewshelflayout.