Thursday 2 May 2019

Viscosity Layout for UICollectionView

Check source code at Github
https://github.com/Sylvia-YiyinShen/ViscosityLayoutDemo

This is a custom UICollectionViewFlowLayout that always make the collection view scroll to the starting point of one element which is also called Sticky Layout





How to use

  • Just initialise a ViscosityLayout and set it as the collectionViewLayout.
  • If needed, specify itemSize, sectionInsets when initialising ViscosityLayout. 




No comments:

Post a Comment