Latest 3.0.0
Homepage https://github.com/tispr/tispr-card-stack
License Apache 2.0 License
Platforms ios 10.0, requires ARC
Authors

Swipable, customizable card stack view, Tinder 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 'TisprCardStack'

please pay attention:

  • 2.x.x versions with swift 4.0
  • 1.x.x versions with swift 3.0

And in your *.swift:

import TisprCardStack

Manual installation

Add TisprCardStackViewCell.swift,TisprCardStackViewController.swift, TisprCardStackViewLayout.swift into your Xcode project.

Usage start

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

  2. Configuration TisprCardStackViewController,

        setAnimationSpeed(0.85)
        setCardSize(size)
  3. then specify count of cards,

    func numberOfCards() -> Int {}
  4. 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()
  2. How to configure the amount of visible cards in each stack (top and bottom):

        layout.topStackMaximumSize = 4
        layout.bottomStackMaximumSize = 30
        layout.bottomStackCardHeight = 45
  3. Changing card position: How to call the movement of a card from the top to the bottom stack and vice versa:
        moveCardUp()
        moveCardDown()
  4. Delete card:
        deleteCard
  5. You can track changing of card stack in method:
    func cardDidChangeState(cardIndex: Int)

For more detail, see the sample project.

Contact

[email protected], [email protected]

License

Apache License
Version 2.0. See LICENSE.txt

Latest podspec

{
    "name": "TisprCardStack",
    "version": "3.0.0",
    "summary": "Swipable, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI",
    "description": "Library that allows to have cards UI, like Tinder and Potluck. it is based on CollectionView. Works on iOS 10, Swift4",
    "license": {
        "type": "Apache 2.0 License",
        "file": "LICENSE.txt"
    },
    "homepage": "https://github.com/tispr/tispr-card-stack",
    "authors": {
        "Andrei Pitsko": "[email protected]"
    },
    "social_media_url": "http://twitter.com/tispr",
    "source": {
        "git": "https://github.com/tispr/tispr-card-stack.git",
        "tag": "3.0.0"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "TisprCardStack/TisprCardStack/*.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This