Latest 0.2.0
Homepage https://github.com/skensell/MXCardsSwipingView
License MIT
Platforms ios 7.0
Frameworks UIKit
Authors

Version
License
Platform

A lightweight solution for introducing swipable cards like Tinder or AngelList. Just a few hundred lines of code.

Preview

Swiping example
Swiping example

Usage

#import <MXCardsSwipingView/MXCardsSwipingView.h>

Create an MXCardsSwipingView and add it to your view hierarchy. Add cards to it with enqueueCard:. Each card added is immediately added to the view heirarchy behind the previously enqueued cards. When a card is dismissed you can enqueue more during the delegate callback

- (BOOL)cardsSwipingView:(MXCardsSwipingView*)cardsSwipingView willDismissCard:(UIView*)card toLeft:(BOOL)toLeft;

A card can be any UIView, but you can get more customizability by adopting the MXSwipableCard protocol (e.g. to fade in a certain subview of the card depending on the swipe direction).

The example project (which is featured in the above gifs) shows how to add a drop shadow to a card with corner radius as well as how to add differing transforms to background cards as opposed to the top card.

Whatever size you enqueue a card with, it stays that size. Only the center of the card will be readjusted and managed by MXCardsSwipingView.

Check out MXCardsSwipingView.h for full API.

Development

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Deployment target of at least iOS 7.0.

Installation

MXCardsSwipingView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MXCardsSwipingView"

Author

Scott Kensell, [email protected]

License

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

Latest podspec

{
    "name": "MXCardsSwipingView",
    "version": "0.2.0",
    "summary": "A UIView offering Tinder style card swiping on iOS.",
    "description": "It's a lightweight `UIView` to extract the pan gesture and animations involved in the card swipingnparadigm which has become so popular. Other card-swiping libraries try to do too much IMO and make itnhard to customize. To use it, you simply instantiate a `MXCardsSwipingView` and enqueue cards. You cannenqueue more cards when its delegate methods are called.  And the card you enqueue can optionally conform to then`MXSwipableCard` protocol to provide additional customizability (e.g. fading views in on swipe left or right).",
    "homepage": "https://github.com/skensell/MXCardsSwipingView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Scott Kensell": "[email protected]"
    },
    "source": {
        "git": "https://github.com/skensell/MXCardsSwipingView.git",
        "tag": "0.2.0"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source_files": "MXCardsSwipingView/Classes/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This