简体   繁体   中英

Template creator to show different size collectionview cell in ios

At the moment i am trying to implement to a template creator to show variable size grids (cells.).

模板

Is it possible to create this using UICollectionView

Yes, you would have to skip the default UICollectionViewFlowLayout and write your own UICollectionViewLayout.

In it, you can define what the size and position (and other attributes) of each of your grids are. And in the UICollectionViewCells, you would draw the frames, etc.

We can implement your requirement easily, but lots of sample code available on google. So save your time

Here is one sample code, I think it will meet your expectation

Example Collection View

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM