Vishal-Singh-Panwar / InfiniteScrolling

Add infinite scrolling to collection view.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cell size (height + width)

own2pwn opened this issue · comments

Is it possible to manually set cell size?
i.e. full CGSize not only one param?

Hi,

Can you update your pod and try using below delegate methods to configure height in case of horizontal scrolling or width in case of vertical scrolling:

func verticalPaddingForHorizontalInfiniteScrollingBehaviour(behaviour: InfiniteScrollingBehaviour) -> CGFloat
func horizonalPaddingForHorizontalInfiniteScrollingBehaviour(behaviour: InfiniteScrollingBehaviour) -> CGFloat

One of the above delegate methods will be called depending on your scroll direction. The reason to avoid passing CGSize is that, wanted to make sure that the cell size to be enough so collectionView show items in a single line. Otherwise, collectionView might show multiple lines if the size is too small.

@Vishal-Singh-Panwar Do have any insight on the best approach to support multiple variable widths?