KelvinJin / AnimatedCollectionViewLayout

A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code.
MIT License
4.74k stars 350 forks source link

Any support for infinite scrolling? #4

Open dkcas11 opened 7 years ago

dkcas11 commented 7 years ago

As the title says. If not, could there be in the future?

Thanks :)

broccolii commented 7 years ago

@dkcas11 Foolish way to set numberOfItems to INT64_MAX 😊

dkcas11 commented 7 years ago

@broccolii yea i know of that trick, but given that the cells are dequeued to a stack, i will never actually get to reuse the cells correctly but just keep creating them, taking up a lot of memory (theoretical). I haven't researched this completely, but it is my understanding that the cells are simply dequeued.

broccolii commented 7 years ago

These cells will be reused, do not need to consider the memory problem

dkcas11 commented 7 years ago

Do you have documentation on this? It was my understanding that they did not, given they also must have a unique indexPath, therefore making the cell unique too.

KelvinJin commented 7 years ago

Sorry for the late. I think it's definitely possible for this library to support infinite scrolling given the fact that the layout can define the size of the collectionView and dynamically change the position of the cells.

I'll add this to the todo list and see if it's easy to do. Thanks for the good idea and PR is always welcome ;)

dkcas11 commented 7 years ago

This would be awesome! Especially given the nice animations, a user would easily get lost on browsing the cells endlessly :)

dkcas11 commented 7 years ago

Have you looked into this? :)

KelvinJin commented 7 years ago

@dkcas11 Unfortunately nope. I've been busy working on a new project for a new job. 😢

dkcas11 commented 7 years ago

@KelvinJin No worries, good luck on the job :)

BilalReffas commented 7 years ago

Is someone working on this?