New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected behaviour when inserting new cells. #30
Comments
Can you provide more information or a sample project so we can take a look? |
Which version are you using and is the bouncing the section header or the stickyheader? |
Using version
|
I have a similar issue on the same version. The stickyHeader and regular sectionHeader animate oddly when reloading sections. It seems that the stickyheader content is being animated when we expect it to remain static. let indexSet = NSIndexSet(indexesInRange: NSMakeRange(0, self.collectionView.numberOfSections()))
collectionView.reloadSections(indexSet) |
I notice the initial attributes were not modified to reflect the change. I made a small patch and pushed to the demo project, let me know if that works for you guys! |
Same problem here and the small patch doesn't fix it for me. On my side the problem is triggered when I perform insertItemsAtIndexPath inside a performBatchUpdates; with a simple reloadData the sticky header works just fine. |
@nferruzzi Place your UIView.animateWithDuration(0, animations: {
self.collectionView.performBatchUpdates({
var indexPaths:[NSIndexPath] = []
for var i = oldSize; i < self.data.count; i++ {
indexPaths.append(NSIndexPath(forItem: i, inSection: 0))
}
self.collectionView.insertItemsAtIndexPaths(indexPaths)
}, completion: nil)
}) |
0.2.8 has some updates on better handing animation, please feel free to reopen if still have issues. |
I have my
UICollectionView
backed by aNSFetchedResultsController
to insert/update cells.My cells get inserted as the user scrolls. What seems to happen is the sticky headers scroll down & then return once the bounce deceleration animation is complete.
I think a solution would be to only insert cells once animation deceleration is complete.
The text was updated successfully, but these errors were encountered: