This article is published on my wechat official account. You can follow it by scanning the QR code at the bottom of the article or searching for HelloWorld Jieshao in wechat.

Good morning, everyone! A new week begins! In the blink of an eye, we are about to wave goodbye to March, time can be really fast, can not help but sigh “helpless flowers fall, deja vu yan return”.

Recently, I spent a lot of time to sort out the knowledge points related to UICollectionView, speaking of UICollectionView this control is also very strange, in our daily development, obviously the frequency of use is very high, but when we need to achieve some slightly more complex layout is very laborious, In general, it’s our lack of understanding of how it works.

Ok, here I put together these knowledge points of the tutorial list, basically can let you have a systematic understanding of the UICollectionView layout, of course, if you are willing to look at it, willing to do it yourself!

Use UICollectionView to achieve the card rotation effect of home page

Article portal: use UICollectionView to achieve the effect of home card rotation

The characteristics of

  1. Support picture manual horizontal scrolling
  2. Support pictures automatically scrolling playback
  3. The pagination control at the bottom highlights which image is currently in use

Effect:

2. Use UICollectionView to achieve paging sliding effect

Article portal: Use UICollectionView to achieve paging slide effect

The characteristics of

The width of the scrolling page can be customized and will not be obscured. You do not need to set isPagingEnabled to true to implement paging

Effect:

Custom layout to implement waterfall flow view

Article Portal: Custom layout to implement waterfall Flow view

Important points

  1. About custom layouts
  2. Dynamic size Cell processing
  3. Compute and cache layout properties

Effect:

Custom layout to achieve the Cover Flow effect

Article Portal: Custom layout for Cover Flow effect

Important points

  1. Custom attribute calculation, to achieve scaling effect
  2. Implement scrolling pagination

Effect:

Explore the SupplementaryView and Decoration View

Article portal: explore the SupplementaryView and Decoration View of UICollectionView

Important points

  1. Set Supplementary View
  2. Set Decoration View to
  3. UICollectionView Cell drag effect
  4. Use the above function points to achieve an electronic bookshelf

Effect:

The above content is enough to let you systematically learn the use of the UICollectionView control, if you want to further learn this control, you can refer to the official documentation given by Apple:

Developer.apple.com/documentati…

Related reading:

Swift explore the SupplementaryView and Decoration View of UICollectionView

Swift custom layout achieves Cover Flow effect

UICollectionView Custom layout implementation waterfall flow view

Use UICollectionView to achieve the paging slide effect

Use UICollectionView to achieve the card rotation effect of home page

Follow my technical public account “HelloWorld Jieshao “to get more quality technical articles.