zepojo / UPCarouselFlowLayout

A fancy carousel flow layout for UICollectionView on iOS.
MIT License
1.67k stars 235 forks source link

Paging does not page to the center of an item as would be expected #12

Closed cjhenck closed 7 years ago

cjhenck commented 8 years ago

If you enable paging on the UICollectionView it does not scroll to a specific item and will instead end up between items.

I need to test more to confirm in a clean project.

niteshtak commented 7 years ago

Yeah can you please fix that why its not paginated properly.

itruf commented 7 years ago

You should turn off pagination in uicollectionview if it's enabled.

cjhenck commented 7 years ago

This isn't really a solution - pagination is an ideal use case for this library if you want to force people to go through cells one at a time. I think the solution is to set the size perfectly for a single page if paging is enabled.

zepojo commented 7 years ago

This layout isn't supposed to work with the paging enabled, as it replaces the pagination logic to "squeeze" the expected page size to let the side items appear. If you set the collection size to fit a single page, you won't be able to see those items, or if you set the clipToBounds to false you won't be able to scroll the collection from its sides.