Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tispr/tispr-card-stack
Swipe able, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI
https://github.com/tispr/tispr-card-stack
indy
Last synced: 6 days ago
JSON representation
Swipe able, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI
- Host: GitHub
- URL: https://github.com/tispr/tispr-card-stack
- Owner: tispr
- License: apache-2.0
- Created: 2015-07-14T21:29:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-01-28T10:34:37.000Z (almost 3 years ago)
- Last Synced: 2024-04-24T14:49:17.768Z (8 months ago)
- Topics: indy
- Language: Swift
- Homepage: https://weareindy.com
- Size: 7.11 MB
- Stars: 850
- Watchers: 28
- Forks: 76
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-ios - TisprCardStack - Library that allows to have cards UI. (UI / Cards)
- awesome-cocoa - tispr-card-stack
- awesome-ios-star - TisprCardStack - Library that allows to have cards UI. (UI / Cards)
- awesome-ios - TisprCardStack - Swipe able, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI. [•](https://raw.githubusercontent.com/tispr/tispr-card-stack/master/Screenshot_main.gif) (Content / Cards)
README
Swipable, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI
С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.0And in your `*.swift`:
```swift
import TisprCardStack
```Manual installation
------------------Add `TisprCardStackViewCell.swift`,`TisprCardStackViewController.swift`, `TisprCardStackViewLayout.swift` into your Xcode project.
Usage start
-----
1. Create controller 'TisprCardStackViewController' with 'TisprCardStackViewLayout' collectionViewLayout2. Configuration TisprCardStackViewController,
```swift
setAnimationSpeed(0.85)
setCardSize(size)
```3. then specify count of cards,
```swift
func numberOfCards() -> Int {}
```
4. return cards by index:
```swift
card(collectionView: UICollectionView, cardForItemAtIndexPath indexPath: NSIndexPath) -> TisprCardStackViewCell {}
```Additional features/options
-----
1. Adding a new card: How to call the animation:```swift
func newCardWasAdded()
```1. How to configure the amount of visible cards in each stack (top and bottom):
```swift
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:
```swift
moveCardUp()
moveCardDown()
```
1. Delete card:
```swift
deleteCard
```
1. You can track changing of card stack in method:
```swift
func cardDidChangeState(cardIndex: Int)
```For more detail, see the sample project.
Contact owner
-------[Indy](https://weareindy.com)
License
-------
Apache License
Version 2.0. See LICENSE.txt