Sunday, November 4, 2018

iOS Paralax View using UICollectionViewlayout

Such effect is called parallax. The algorithm is actually pretty simple. The problem is how you can implement in a UICollectionView. You could in theory register the scroll event and move the visible cells around to achieve this. However, this is not what we are going to do today. We’ll instead create a UICollectionViewLayout subclass to handle this for us. Below effects are possible with this approach.




references:
https://medium.com/@uthoft.jin/how-to-animate-uicollectionview-using-a-custom-uicollectionviewlayout-a7513add25b2

No comments:

Post a Comment