Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UICollectionView - replicate Photos.app functionality

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

like image 789
Mikael Avatar asked Oct 17 '12 05:10

Mikael


2 Answers

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).

http://www.raywenderlich.com/store/ios-6-by-tutorials

like image 159
Daniel Nordh Avatar answered Oct 17 '22 19:10

Daniel Nordh


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).

http://thyraz.tumblr.com/post/35135290759/stacklayout

like image 30
Thyraz Avatar answered Oct 17 '22 19:10

Thyraz