Latest 0.1.0
Homepage https://github.com/xspyhack/DeckView
License MIT
Platforms ios 8.0, requires ARC
Authors

DeckView

A simple card collection view for iOS, works like UITableView.

Screenshot

API

DeckView follows Apple convention for data-driven views by providing DataSource & Delegate protocols. And the CardView is reusable like UITableViewCell.

DataSource
public protocol DeckViewDataSource: class {

    func numberOfCardInDeckView(deckView: DeckView) -> Int

    func deckView(deckView: DeckView, cardViewAt index: Int) -> CardView
}
Delegate
public protocol DeckViewDelegate: class {

    func deckView(deckView: DeckView, didSelectAt index: Int)
}
Method
public func reloadData()
public func register(type cardClass: AnyClass?)
public func dequeueCardView(for index: Int) -> CardView
public func fadeOut(with animation: (cardView: CardView, completion: () -> Void) -> Void)

Requirements

Swift 2.0, iOS 8.0

Installation

It’s recommended to use CocoaPods.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:

$ [sudo] gem install cocoapods

To integrate DeckView into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'DeckView'

Then, run the following command:

$ pod install

You should open the {Project}.xcworkspace instead of the {Project}.xcodeproj after you installed anything from CocoaPods.

For more information about how to use CocoaPods, I suggest this tutorial.

License

DeckView is available under the MIT License license. See the LICENSE file for more info.

Latest podspec

{
    "name": "DeckView",
    "version": "0.1.0",
    "summary": "DeckView is a simple card collection view for iOS, works like UITableView.",
    "description": "A simple card collection view for iOS, works like UITableView.nDeckView providing UITableView like API so it is easy for use.",
    "homepage": "https://github.com/xspyhack/DeckView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "xspyhack": "[email protected]"
    },
    "social_media_url": "https://twitter.com/xspyhack",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/xspyhack/DeckView.git",
        "tag": "0.1.0"
    },
    "source_files": "DeckView/*.swift",
    "requires_arc": true
}

Pin It on Pinterest

Share This