UICollectionView - replicate Photos.app functionality
-
07-07-2021 - |
Question
I'm trying to create a UICollectionView that behaves like the photos.app on the iPad (pinch to group and expand).
How do you think photos.app is built?
- Is it one UICollectionView with one layout, and the pinch just does a batch update and moves cells in to sections?
- Or is it one UICollectionView with two different layout?
- Or the last option, could it be two UICollectionViews?
What do you think is the best approach?
Thanks
Solution
It is the second suggestion - two different layouts.
I'd recommend checking the almost identical example in iOS6 by Turorials book (paid content, but probably worth it in your case).
OTHER TIPS
In case you didn't buy the book yet, I also wrote a blog post about the basic idea (and some code for the flow layout subclass).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow