Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UICollectionView vs UIPageViewController

I need to have different full screen views in my app. Very similar to how snapchat works. The views should be able to communicate between each other.

My question is: Should I use a UICollectionView with cells same size as the screen or should I use UIPageViewController?

Please provide some background info to support your opinion!

like image 446
Balázs Vincze Avatar asked Sep 01 '25 20:09

Balázs Vincze


1 Answers

I think both have pretty different purposes. UICollectionView is great to build a mosaic of views (think an image gallery for instance), whereas UIPageViewController is kind of similar to the flipping pages of a book. The latter seems to be what you need, but UIPVC doesn't seem to offer many tweaking/customizations, like custom transitions for example. In which case you may want to start from a UIScrollView with paging enabled to recreate something similar but with more potential. Here's an example.

like image 106
Greg de J Avatar answered Sep 03 '25 10:09

Greg de J