Open darko55s opened 6 years ago
@darko55s what is the actual bug? Have you done any digging into this?
Hey @rnystrom, sorry for late response, the is issue is that the scrollToObject is not calculating the height of the supplementaryHeaderViews. So when you do scrollToObject on a section that is not visible(when it need to scroll backwards) the first cell of the sectionController is not fully visible. The part that is not visible has the exact height as the supplementaryHeaderView height.
Also the same happens when you use scrollToSectionController: on the collectionContext object. It scrolls to the correct section and index but the visible area of the topmost cell is cut by the supplementaryHeaderView.
P.S. The supplementaryHeaderView are sticky i am using this :
let collectionView = UICollectionView(frame: .zero, collectionViewLayout: ListCollectionViewLayout(stickyHeaders: true, topContentInset: 0, stretchToEdge: true))
I'm able to reproduce this. Will look into a fix.
I will look into it as well
New issue checklist
README
and documentationGeneral information
IGListKit
version: 3.0Debug information
Hi, i am using IGListKit with supplementaryHeaderViews but i am facing an issue when i want to use the
scrollToObject:
method inside the adapter. When the visible sections are greater then the one that i want to scroll to it scrolls to the correct object but the sections are not fully visible.You can reproduce the issue in one of the Demo Projects, the one for the Supplementary Views if you scroll to bottom manually but add scroll to index 0 to be executed after some delay. I am using the following code:
Am i doing something wrong or the contentOffset calculations is bad.
Thank you !