Search code examples
iosuicollectionviewuipagecontrol

UIPageControl or Horizontal UICollectionView?


I am looking to achieve a similar effect to the Netflix app where at the top they have a scrollable header displaying different 'featured' movies.

As soon as the header start to scroll and the next image enters the view it downloads the image, also while being scrolled if you let go it snaps into place the image that was currently being shown the most.

I am not sure how to proceed and try to solve this problem. Any suggestions? should I look at using UIPageControl, or should I use a horizontal UICollectionView? Thanks

enter image description here


Solution

  • You can implement it by using a horizon collection view,it can help you handle the reuse of imageViews!Or you can use a UIScrollView to contain a couple of subViews to display the image or three subViews and switch the image content