Open Recouse opened 5 years ago
I have a similar issue where my custom UICollectionViewLayout
does the size calculation to adapt to the screen (list vs grid), something I'm not sure I want to leave to the ListSectionController
and where collectionContext
doesn't have enough info anyway.
I am trying to do Pinterest layout Any Ideas are welcome
@jassimkm You can get item size from the adapter with layout delegate. Like this:
extension ViewController: CustomCollectionViewLayoutDelegate {
func sizeForItem(at indexPath: IndexPath) -> CGSize {
return adapter.sizeForItem(at: indexPath)
}
}
New issue checklist
README
and docuxmentationHow can I get value of
- (CGSize)sizeForItemAtIndex:(NSInteger)index;
method in my customUICollectionViewLayout
?