Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cell size (height + width) #7

Open
own2pwn opened this issue Mar 17, 2018 · 2 comments
Open

Cell size (height + width) #7

own2pwn opened this issue Mar 17, 2018 · 2 comments
Assignees

Comments

@own2pwn
Copy link

own2pwn commented Mar 17, 2018

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

@Vishal-Singh-Panwar Vishal-Singh-Panwar self-assigned this Mar 22, 2018
@Vishal-Singh-Panwar
Copy link
Owner

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.

@delox
Copy link

delox commented Jul 20, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants