TisprCardStack 3.0.0

TisprCardStack 3.0.0

LangLanguage SwiftSwift
License Apache 2
ReleasedLast Release Mar 2018
SPMSupports SPM

Maintained by Andrei Pitsko.



The tispr left/right feature. Cards UI

Ever wanted to know how to code the UI for the swipe left/right feature? • in Swift • for iOS8

please pay attention:

  • 1.x.x versions with swift 3.0
  • 0.2.x - 0.3.x versions with swift 2.0
  • 0.1.x versions with swift 1.2

Installation: With tools

###CocoaPods: In your Podfile:
swift 3.0

pod 'TisprCardStack', '~> 1.0.0'

swift 2.0

pod 'TisprCardStack', '~> 0.3.1'

And in your *.swift:

import TisprCardStack

###Installation: Manual Add TisprCardStackViewCell.swift,TisprCardStackViewController.swift, TisprCardStackViewLayout.swift into your Xcode project.

Usage start

  1. Create controller ‘TisprCardStackViewController’ with ‘TisprCardStackViewLayout’ collectionViewLayout

  2. Configuration TisprCardStackViewController,

  1. then specify count of cards,
func numberOfCards() -> Int {}
  1. return cards by index:
card(collectionView: UICollectionView, cardForItemAtIndexPath indexPath: NSIndexPath) -> TisprCardStackViewCell {}

Additional features/options

  1. Adding a new card: How to call the animation:
func newCardWasAdded()
  1. How to configure the amount of visible cards in each stack (top and bottom):
      layout.topStackMaximumSize = 4
      layout.bottomStackMaximumSize = 30
      layout.bottomStackCardHeight = 45
  1. Changing card position: How to call the movement of a card from the top to the bottom stack and vice versa:
  1. You can track changing of card stack in method:
  func cardDidChangeState(cardIndex: Int)

For more detail, see the sample project.


[email protected]


Apache License Version 2.0. See LICENSE.txt