Git Product home page Git Product logo

tinderswipeview's Introduction

Tinder Swipe View Swift 4.0.x

Inspired animation from Tinder and Potluck with random undo feature!

Run in physical device for better animaton!!!!

Preview

Size Limit example Size Limit example

Screenshot

Size Limit example Size Limit example

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like SwiftMultiSelect in your projects. You can install it with the following command:

$ gem install cocoapods

Podfile

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

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

target 'TargetName' do
use_frameworks!
pod 'TinderSwipeView’
end

Then, run the following command:

$ pod install

Instantiation

Tinder Swipe can be added to storyboard or instantiated programmatically:

    let swipeView = TinderSwipeView<UserModel>(frame: viewContainer.bounds, overlayGenerator: overlayGenerator)
    viewContainer.addSubview(swipeView)
    swipeView.showTinderCards(with: userModels)

Animation

    internal func cardGoesRight()

    internal func cardGoesLeft()

    internal func rightClickAction()

    internal func leftClickAction()

    internal func makeUndoAction()

    internal func rollBackCard()

    internal func shakeAnimationCard(completion: @escaping (Bool) -> ())

Delegate Methods

Here is a list of callbacks you can listen to:

protocol TinderCardDelegate: NSObjectProtocol {

    func dummyAnimationDone()
    func currentCardStatus(card: Any, distance: CGFloat)
    func cardGoesLeft(_ object: Any)
    func cardGoesRight(_ object: Any)
    func endOfCardsReached()
}

Requirements

* Swift 5
* XCode 10
* iOS 8.0 (Min SDK)

Author

Nicky Patson

HomePage

[email protected]

License

Tinder Swipe View is available under the MIT license. See the LICENSE file for more info.

tinderswipeview's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.