Swipable, customizable card stack view, Linkedin like card stack view based on UICollectionView. Cards UI
Сocoapods installation
Add in your Podfile
:
pod 'HorizontalCardStack'
And in your *.swift
:
import HorizontalCardStack
Manual installation
Add DecorationViewAttributes.swift
,HorizontalCardStackLayout.swift
into your Xcode project.
Usage start (see example project for more details)
Create UICollectionView with 'HorizontalCardStackLayout' collectionViewLayout
Additional features/options
- Callback about top card changes:
func topCardWasChanged(_ index: Int)
- Callback about card movements:
func cardWasMoved(_ index: Int, isLeftDirection: Bool)
- To customize left/right views
updateDecorationViews
- To freeze left/right movements
func shouldCardBeMoved(_ isLeftDirection: Bool) -> Bool?
For more detail, see the sample project.
Contact
License
Apache License Version 2.0. See LICENSE.txt