CardStackCollectionViewLayout provides UICollectionViewLayout using a stacked card metaphore, similar to Apple Wallet's Card view. The 0th (uppermost) card is displayed on the top of the stack, and the stack may be expanded (fanned-out) or displayed normally as a stack of cards with a small portion of the bottom of each card visible.
Cell/card insert and delete transitions are provided. They continue the card stack metaphor by visually 'swiping' a deleted row from the stack, or by adding a newly inserted rom from the bottom.
To run the example project, clone the repo, and run pod install
iOS 9+
CardStackCollectionViewLayout is available through CocoaPods or Swift Package Manager (SPM).
To install it, simply add the following line to your Podfile:
pod 'CardStackCollectionViewLayout'
Please send PRs!
Currently the delete animation is shown when changing modes if -performBatchUpdates is used (for example when expanding the card stack). As a temporary workaround you may set the showDeleteAnimation
flag to false while changing modes.
cdstamper, chris@cdstamper.co
CardStackCollectionViewLayout is available under the MIT license. See the LICENSE file for more info.