CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.
TestsTested | ✗ |
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:
###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.
Create controller ‘TisprCardStackViewController’ with ‘TisprCardStackViewLayout’ collectionViewLayout
Configuration TisprCardStackViewController,
setAnimationSpeed(0.85)
setCardSize(size)
func numberOfCards() -> Int {}
card(collectionView: UICollectionView, cardForItemAtIndexPath indexPath: NSIndexPath) -> TisprCardStackViewCell {}
func newCardWasAdded()
layout.topStackMaximumSize = 4
layout.bottomStackMaximumSize = 30
layout.bottomStackCardHeight = 45
moveCardUp()
moveCardDown()
func cardDidChangeState(cardIndex: Int)
For more detail, see the sample project.
Apache License Version 2.0. See LICENSE.txt