pitiphong-p / CollectionViewShelfLayout

A UICollectionViewLayout subclass displays its items as rows of items similar to the App Store Feature tab without a nested UITableView/UICollectionView hack.
MIT License
376 stars 30 forks source link

Different sizes for different rows #5

Closed vaibhav-varshaaweblabs closed 6 years ago

vaibhav-varshaaweblabs commented 7 years ago

Is it possible to set different row height?

Check the screenshot attached simulator screen shot - iphone 6s - 2017-10-17 at 11 29 31

pitiphong-p commented 7 years ago

It’s not supported right out of the box yet. However you can implement that and open a PR back to this repo. I can help you guide on how to do it

vaibhav-varshaaweblabs commented 7 years ago

@pitiphong-p Yes, please help me out how to do that. What changes do I need to do in the CollectionViewShelfLayout.swift file?

pitiphong-p commented 7 years ago

You can add that feature by letting CollectionViewShelfLayout having its own delegate and add an optional method for that in this delegate and having the layout to ask its delegate when the layout is calculating its layout informations.

pitiphong-p commented 6 years ago

I have implemented this feature and published it. Please try with the latest release version 0.6.2