Pitsko / HorizontalCardStack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swipable, customizable card stack view, Linkedin like card stack view based on UICollectionView. Cards UI

Swipable, customizable card stack view, Tinder like card stack view based on UICollectionView

С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

  1. Callback about top card changes:
func topCardWasChanged(_ index: Int)
  1. Callback about card movements:
  func cardWasMoved(_ index: Int, isLeftDirection: Bool)
  1. To customize left/right views
  updateDecorationViews
  1. To freeze left/right movements
  func shouldCardBeMoved(_ isLeftDirection: Bool) -> Bool?

For more detail, see the sample project.

Contact

andrei.pitsko@gmail.com

License

Apache License Version 2.0. See LICENSE.txt

About

License:Apache License 2.0


Languages

Language:Swift 95.5%Language:Ruby 4.5%