🎓 UICollectionView
is extremely flexible in building customized content thanks to its powerful UICollectionViewFlowLayout
. We are using it to build the main interface of the native iOS Photos
app.
Check out the Photos
native app on iOS, you will find out the main interface is composed of two horizontal scroll views. The bigger one displays the full resolution copies while the smaller displays the thumbnails. The scrolling motion on either one of them is reflected on the other. Look closer as you scroll the photos, the bigger scroll view renders the photo with parallax effect, and the same image also presents the accordion animation effect in the smaller scroll view.
👷 In this lab, we will build the main interface of Photos
using two UICollectionViews
. To be more specific, we will customize the UICollectionViewFlowLayout associated with each UICollectionView
to decide the size
and center
of the items that are visible on the screen. The changes on these attributes create the parallax
and accordion
animation.
🔬 This GitHub Page explains the details of the lab.