filletofish / CardsLayout

:star: Custom card-designed CollectionView layout

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for visibility of previous cell

satishVekariya opened this issue · comments

Need support to display previous item edge at left side of collectionview
screenshot 2018-10-15 at 4 06 51 pm

Hi,

I think the way you could achieve that is altering the behaviour of function computeLayoutAttributesForItem at CardsCollectionViewLayout.swift l:114 by using percentageDeltaOffset to set center.x you need.

Actually, you can create an hook (delegate or callback) for custom changes for the cell that would be called in computeLayoutAttributesForItem and form it in separate Pull Request. So anyone can alter the behaviour without changing the source code.