cruzdiego / horizontalfloatingheaderlayout Goto Github PK
View Code? Open in Web Editor NEWFloating headers with horizontal scrolling layout for UICollectionView, inspired by iOS native Emoji Keyboard layout
License: MIT License
Floating headers with horizontal scrolling layout for UICollectionView, inspired by iOS native Emoji Keyboard layout
License: MIT License
Hi Diego,
Really great job with this layout. Just wondering, have you considered subclassing UICollectionViewFlowLayout instead of UICollecitonViewLayout, and not introducing a new delegate (use flowLayout instead)?
Stas
Thanks for sharing your collectionView layout. I came across this crash when trying it out.
Occurs when the dateSource returns 0 sections.
func lastItemMaxX()->CGFloat{
let lastSection = collectionView.numberOfSections - 1
let lastIndexInSection = collectionView.numberOfItems(inSection:lastSection) - 1
if let lastItemAttributes = layoutAttributesForItem(at: IndexPath(row: lastIndexInSection, section: lastSection)){
return lastItemAttributes.frame.maxX
}else{
return 0
}
}
Thanks for sharing this layout. Just a heads-up that the layout might behave unexpectedly when the width of the items is less than the header's width.
As you can see in this screenshot, the header of the first and last section is aligned incorrectly. It seems like that the total width of the sections items is not taking into account.
I loved your subclass, friend. I'm implementing it on my school project.
I have question: How can I change the position of section? I don't see any delegate method that could help me here.
Hi. I am having issues with getting the example project to work. When I run it, the app builds successfully but loads to a blank screen with the navigation header displayed. In my attempt to debug this, I discovered that none of the HorizontalFloatingHeaderLayoutDelegate methods are called. cellForItemAt is not being called either. Any help or guidance on this would be much appreciated. Thanks!
Hi, are you considering adding the swift 3 support soon?
If not, I can push you a pull request if you open a swift3
branch.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.