I'm using a UICollectionview
with a circular layout. I'm trying to calculate the contentOffset
per item but with the circular layout the full contentsize
does not seem match the content.
- The collectionview's total contentSize = 780
- The content offset of the last item = 397(?)
- The content offset per item = 33(?)
Is there any way I can get the offset for an item by it's indexPath
or at least the correct (397) value for the last item's in the collectionview
? I got these values by testing and printing the contentoffset
but I would like to calculate these numbers (33 and 397) by code without having to scroll.
So is there a way to calculate a cell's contentoffset
(?) inside the collectionview
by it's indexPath
?
Thanks!