KolodaView is a class designed to simplify the implementation of Tinder like cards on iOS.

Overview

KolodaView cocoapodsCarthage compatible Swift 5.0

Yalantis

Check this article on our blog.

Preview Preview

Purpose

KolodaView is a class designed to simplify the implementation of Tinder like cards on iOS. It adds convenient functionality such as a UITableView-style dataSource/delegate interface for loading views dynamically, and efficient view loading, unloading .

Supported OS & SDK Versions

  • Supported build target - iOS 11.0 (Xcode 9)

ARC Compatibility

KolodaView requires ARC.

Thread Safety

KolodaView is subclassed from UIView and - as with all UIKit components - it should only be accessed from the main thread. You may wish to use threads for loading or updating KolodaView contents or items, but always ensure that once your content has loaded, you switch back to the main thread before updating the KolodaView.

Installation

To install via CocoaPods add this lines to your Podfile. You need CocoaPods v. 1.1 or higher

use_frameworks!
pod "Koloda"

To install via Carthage add this lines to your Cartfile

github "Yalantis/Koloda"

To install manually the KolodaView class in an app, just drag the KolodaView, DraggableCardView, OverlayView class files (demo files and assets are not needed) into your project. Also you need to install facebook-pop. Or add bridging header if you are using CocoaPods.

Usage

  1. Import Koloda module to your MyKolodaViewController class

    import Koloda
  2. Add KolodaView to MyKolodaViewController, then set dataSource and delegate for it

    class MyKolodaViewController: UIViewController {
        @IBOutlet weak var kolodaView: KolodaView!
    
        override func viewDidLoad() {
            super.viewDidLoad()
    
            kolodaView.dataSource = self
            kolodaView.delegate = self
        }
    }
  3. Conform your MyKolodaViewController to KolodaViewDelegate protocol and override some methods if you need, e.g.

    extension MyKolodaViewController: KolodaViewDelegate {
        func kolodaDidRunOutOfCards(_ koloda: KolodaView) {
            koloda.reloadData()
        }
    
        func koloda(_ koloda: KolodaView, didSelectCardAt index: Int) {
            UIApplication.shared.openURL(URL(string: "https://yalantis.com/")!)
        }
    }
  4. Conform MyKolodaViewController to KolodaViewDataSource protocol and implement all the methods , e.g.

    extension MyKolodaViewController: KolodaViewDataSource {
    
        func kolodaNumberOfCards(_ koloda:KolodaView) -> Int {
            return images.count
        }
    
        func kolodaSpeedThatCardShouldDrag(_ koloda: KolodaView) -> DragSpeed {
            return .fast
        }
    
        func koloda(_ koloda: KolodaView, viewForCardAt index: Int) -> UIView {
            return UIImageView(image: images[index])
        }
    
        func koloda(_ koloda: KolodaView, viewForCardOverlayAt index: Int) -> OverlayView? {
            return Bundle.main.loadNibNamed("OverlayView", owner: self, options: nil)[0] as? OverlayView
        }
    }
  5. KolodaView works with default implementation. Override it to customize its behavior

Also check out an example project with carthage.

Properties

The KolodaView has the following properties:

weak var dataSource: KolodaViewDataSource?

An object that supports the KolodaViewDataSource protocol and can provide views to populate the KolodaView.

weak var delegate: KolodaViewDelegate?

An object that supports the KolodaViewDelegate protocol and can respond to KolodaView events.

private(set) public var currentCardIndex

The index of front card in the KolodaView (read only).

private(set) public var countOfCards

The count of cards in the KolodaView (read only). To set this, implement the kolodaNumberOfCards: dataSource method.

public var countOfVisibleCards

The count of displayed cards in the KolodaView.

Methods

The KolodaView class has the following methods:

public func reloadData()

This method reloads all KolodaView item views from the dataSource and refreshes the display.

public func resetCurrentCardIndex()

This method resets currentCardIndex and calls reloadData, so KolodaView loads from the beginning.

public func revertAction()

Applies undo animation and decrement currentCardIndex.

public func applyAppearAnimationIfNeeded()

Applies appear animation if needed.

public func swipe(_ direction: SwipeResultDirection, force: Bool = false)

Applies swipe animation and action, increment currentCardIndex.

open func frameForCard(at index: Int) -> CGRect

Calculates frames for cards. Useful for overriding. See example to learn more about it.

Protocols

The KolodaView follows the Apple convention for data-driven views by providing two protocol interfaces, KolodaViewDataSource and KolodaViewDelegate.

The KolodaViewDataSource protocol has the following methods:

func koloda(_ kolodaNumberOfCards koloda: KolodaView) -> Int

Return the number of items (views) in the KolodaView.

func koloda(_ koloda: KolodaView, viewForCardAt index: Int) -> UIView

Return a view to be displayed at the specified index in the KolodaView.

func koloda(_ koloda: KolodaView, viewForCardOverlayAt index: Int) -> OverlayView?

Return a view for card overlay at the specified index. For setting custom overlay action on swiping(left/right), you should override didSet of overlayState property in OverlayView. (See Example)

func kolodaSpeedThatCardShouldDrag(_ koloda: KolodaView) -> DragSpeed

Allow management of the swipe animation duration

The KolodaViewDelegate protocol has the following methods:

func koloda(_ koloda: KolodaView, allowedDirectionsForIndex index: Int) -> [SwipeResultDirection]

Return the allowed directions for a given card, defaults to [.left, .right]

func koloda(_ koloda: KolodaView, shouldSwipeCardAt index: Int, in direction: SwipeResultDirection) -> Bool

This method is called before the KolodaView swipes card. Return true or false to allow or deny the swipe.

func koloda(_ koloda: KolodaView, didSwipeCardAt index: Int, in direction: SwipeResultDirection)

This method is called whenever the KolodaView swipes card. It is called regardless of whether the card was swiped programatically or through user interaction.

func kolodaDidRunOutOfCards(_ koloda: KolodaView)

This method is called when the KolodaView has no cards to display.

func koloda(_ koloda: KolodaView, didSelectCardAt index: Int)

This method is called when one of cards is tapped.

func kolodaShouldApplyAppearAnimation(_ koloda: KolodaView) -> Bool

This method is fired on reload, when any cards are displayed. If you return YES from the method or don't implement it, the koloda will apply appear animation.

func kolodaShouldMoveBackgroundCard(_ koloda: KolodaView) -> Bool

This method is fired on start of front card swipping. If you return YES from the method or don't implement it, the koloda will move background card with dragging of front card.

func kolodaShouldTransparentizeNextCard(_ koloda: KolodaView) -> Bool

This method is fired on koloda's layout and after swiping. If you return YES from the method or don't implement it, the koloda will transparentize next card below front card.

func koloda(_ koloda: KolodaView, draggedCardWithPercentage finishPercentage: CGFloat, in direction: SwipeResultDirection)

This method is called whenever the KolodaView recognizes card dragging event.

func kolodaSwipeThresholdRatioMargin(_ koloda: KolodaView) -> CGFloat?

Return the percentage of the distance between the center of the card and the edge at the drag direction that needs to be dragged in order to trigger a swipe. The default behavior (or returning NIL) will set this threshold to half of the distance

func kolodaDidResetCard(_ koloda: KolodaView)

This method is fired after resetting the card.

func koloda(_ koloda: KolodaView, didShowCardAt index: Int)

This method is called after a card has been shown, after animation is complete

func koloda(_ koloda: KolodaView, didRewindTo index: Int)

This method is called after a card was rewound, after animation is complete

func koloda(_ koloda: KolodaView, shouldDragCardAt index: Int) -> Bool

This method is called when the card is beginning to be dragged. If you return YES from the method or don't implement it, the card will move in the direction of the drag. If you return NO the card will not move.

Release Notes

Version 5.0.1

  • added posibility to determine index of rewound card
  • fixed crash after drugging card

Version 5.0

Version 4.7

  • fixed a bug with card responding during swiping via @lixiang1994
  • fixed a bug with inappropriate layouting via @soundsmitten

Version 4.6

Version 4.5

Version 4.4

Version 4.3

  • Swift 4 support
  • iOS 11 frame bugfix

Version 4.0

  • Swift 3 support
  • Get rid of UInt
  • Common bugfix

Version 3.1

  • Multiple Direction Support
  • Delegate methods for swipe disabling

Version 3.0

  • Ability to dynamically insert/delete/reload specific cards
  • External animator
  • Major refactoring. More information
  • Swift 2.2 support

Version 2.0

  • Swift 2.0 support

Version 1.1

  • New delegate methods
  • Fixed minor issues

Version 1.0

  • Release version.

Apps using KolodaView

Preview

Let us know!

We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.

P.S. We’re going to publish more awesomeness wrapped in code and a tutorial on how to make UI for iOS (Android) better than better. Stay tuned!

License

The MIT License (MIT)

Copyright © 2019 Yalantis

Permission is hereby granted free of charge to any person obtaining a copy of this software and associated documentation files (the "Software") to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Comments
  • First card appears with wrong frame

    First card appears with wrong frame

    I have a problem that occurs very seldom but it's pretty ugly.

    First time when I open my screen where I have the draggables cards , the cards appears in very little size and placed in the top left.

    Does anyone know how to fix this or is it a fix already existing?

    type: bug 
    opened by silviu-geronimo 25
  • Multiple direction support

    Multiple direction support

    #118

    Added the ability to swipe in any direction. Currently implemented directions are:

    public enum SwipeResultDirection:String {
        case None
        case Left
        case Right
        case Up
        case Down
        case TopLeft
        case TopRight
        case BottomLeft
        case BottomRight
    }
    

    It could also be extended to another custom direction by specifying a direction point (the coordinate system has its origin at the center to the cardView).

    Most drastic changes are:

    • to determine the swiped direction it compares the current drag vector to the defined direction vectors and determines which direction the drag has the larges projection
    • to determine the swipe percentage, it calculates the normalised distance between the center point of the card, and the border point of the card in the direction in question
      • Also changes had to be made to the animation code so it would be responsive to all direction drags - this is the part I'm least familiar with in the code so I'd advice special care when reviewing these changes
    opened by felix-dumit 22
  • EXC_BAD_ACCESS on Swift 2.0

    EXC_BAD_ACCESS on Swift 2.0

    Dear Yalantis,

    I'm using Swift 2.0 + Xcode 7.0 GM seed, with the swift2.0 branch of Koloda. I get an EXC_BAD_ACCESS error for: self.kolodaView.dataSource = self self.kolodaView.delegate = self

    Here is a screenshot: screen shot 2015-09-16 at 4 07 55 pm

    Thanks!

    Erik

    opened by erikwennerberg 17
  • this is a question, as a Newbie.

    this is a question, as a Newbie.

    I wanted to try using this with data from parse.com, I'm familiar with pulling data in tableview controller using cellforrowatindexpath and updating tableview cell, is there something similar way to achieve that with Koloda. The example uses static images, but i want to populate a view from data from parse.com and update each card accoringly (label, uiimageview) .

    opened by jasan-s 16
  • Isssue when remove index

    Isssue when remove index

    When the user swipe I remove my array on the index which the datasource returns I'm trying to remove my array on

    func koloda(_ koloda: KolodaView, didSwipeCardAt index: Int, in direction: SwipeResultDirection) {
      self.array.remove(at: index)
    }
    

    The problem is afert that I will get an fatal error: Index out of range

    on

      func koloda(_ koloda: KolodaView, viewForCardAt index: Int) -> UIView {}
    

    What I'm doing wrong ? :/

    status: need feedback 
    opened by BilalReffas 14
  • Trigger revertAction() in CustomView

    Trigger revertAction() in CustomView

    I'm using a custom view that I load within the KolodaView instead of images as cards. Is there any way to put the revertAction() function in this custom view? The purpose is to go back to previous card inside the card, not outside. I delegate the action from the custom view to a viewcontroller. Actions work fine apart from the revertAction function. (KolodaView is nil)

    opened by SvshX 11
  • Add isLoop property for looping cards

    Add isLoop property for looping cards

    I am using Koloda in project. Thanks koloda. I added looping property. I will be glad if this feature is added in koloda. If Another solution exists, please let me know...

    opened by brownsoo 10
  • Strange resizing of Card View

    Strange resizing of Card View

    I just started using Koloda and it is perfect except for this one issue. It doesn't happen all the time but it is annoying when it does.

    As you can see below, the Koloda Card resizes to a very small size. Once I swipe away this card it goes back to normal. simulator screen shot 21 sep 2017 23 33 23

    This is what it should look like. simulator screen shot 21 sep 2017 23 33 28

    Using Swift 3.1. Tested on iOS 10 but the issue also occurs on iOS 11. Any help appreciated 👍

    type: bug status: pending 
    opened by alexgoodison 10
  • Koloda and Parse DataStore - I am fetching data but I not able to display the results

    Koloda and Parse DataStore - I am fetching data but I not able to display the results

    Hi,

    I am using Koloda to fetch an Array of Objects into the Card so every card gets a row from my database. I have seen the networking exemple with Alamofire and tried my own code that implements Parse using the same exemple. It is getting the objects from Parse but I have not been able to display them into the cards. Weird, actually I have no errors and the console display "Successfully retrieved 5 objects", but this is only the loadData() function.

    What am I basically trying to achieve: I have (MyView.xib, MyView.swift) that provides the labels. (What I want, is to retrieve from the array to texts into the labels from xib)

    I am retrieving the objects but I have not been successful on displaying them into the card:

    Successfully retrieved 5 posts.
    Optional("EvUICgRQ6E")
    Optional("5kC0FLKQON")
    Optional("1Uyxb2M1Et")
    Optional("aeJpRCG7Qn")
    Optional("GDmGh3IULm")
    

    Some Errors: If I am returning the "numberOfCards" --- I am getting this error:

    fatal error: Array index out of range
    (lldb) 
    

    If I return: "return UInt (self.data.count)" I am not getting any errors but the cards are not being displayed at all.

    I am a bit of a newbie, but pointed into a good direction I will be able to get it done.

    This is my ViewController.swift code:

    //
    //  ViewController.swift
    //  TinderCardsSwift
    //
    //  Created by Eugene Andreyev on 4/23/15.
    //  Copyright (c) 2015 Eugene Andreyev. All rights reserved.
    //
    
    import UIKit
    import Koloda
    import pop
    import Parse
    import ParseUI
    
    private var numberOfCards: UInt = 3
    
    class retriveData {
        var labelText = ""
        var label2Text = ""
    
        init(){
        }
        convenience init(_dictionary: Dictionary<String, AnyObject>){
            self.init()
    
            let getObjects = PFObject()
            labelText = (getObjects.objectForKey("nameEnglish") as? String)!
            label2Text = (getObjects.objectForKey("capital") as? String)!
    
    
        }
    
    
    }
    
    class ViewController: UIViewController, KolodaViewDataSource, KolodaViewDelegate {
    
        @IBOutlet weak var kolodaView: KolodaView!
    
        @IBOutlet weak var menuLeft: UIBarButtonItem!
        @IBOutlet weak var searchRight: UIBarButtonItem!
    
        var data = Array <retriveData>()
    
        //MARK: Lifecycle
        override func viewDidLoad() {
            super.viewDidLoad()
    
            kolodaView.dataSource = self
            kolodaView.delegate = self
    
            menuLeft.target = self.revealViewController()
            menuLeft.action = Selector("revealToggle:")
    
            searchRight.target = self.revealViewController()
            searchRight.action = Selector("rightRevealToggle:")
    
            self.modalTransitionStyle = UIModalTransitionStyle.FlipHorizontal
    
            loadData()
        }
    
        //MARK: Geting Data From Parse and displaying 5 posts with a print result - WORKING
        func loadData (){
    
            let query = PFQuery(className:"Countries")
            query.orderByAscending("nameEnglish")
            query.findObjectsInBackgroundWithBlock {
                (objects:[PFObject]?, error:NSError?) -> Void in
                if error == nil {
                    // The find succeeded.
                    print("Successfully retrieved \(objects!.count) posts.")
                    // Do something with the found objects
                    if let objects = objects {
                        for object in objects {
                            print(object.objectId)
                        }
                    }
                } else {
                    // Log details of the failure
                    print("Error: \(error!) \(error!.userInfo)")
                }
            }
            self.kolodaView.reloadData()
        }
    
    
        @IBAction func logOut4(sender: AnyObject) {
    
            // Send a request to log out a user
            PFUser.logOut()
    
            dispatch_async(dispatch_get_main_queue(), { () -> Void in
                let viewController:UIViewController = UIStoryboard(name: "SlideMain", bundle: nil).instantiateViewControllerWithIdentifier("Login_Platform")
                self.presentViewController(viewController, animated: true, completion: nil)
    
    
            })
    
        }
    
        override func viewWillAppear(animated: Bool) {
    
            if (PFUser.currentUser() == nil) {
                dispatch_async(dispatch_get_main_queue(), { () -> Void in
    
                    let viewController:UIViewController = UIStoryboard(name: "SlideMain", bundle: nil).instantiateViewControllerWithIdentifier("Login_Platform")
                    self.presentViewController(viewController, animated: true, completion: nil)
    
    
    
                })
            }
    
        }
    
    
        //MARK: IBActions
        @IBAction func leftButtonTapped() {
            kolodaView?.swipe(SwipeResultDirection.Left)
        }
    
        @IBAction func rightButtonTapped() {
            kolodaView?.swipe(SwipeResultDirection.Right)
        }
    
        @IBAction func undoButtonTapped() {
            kolodaView?.revertAction()
        }
    
        //MARK: KolodaViewDataSource
        func kolodaNumberOfCards(koloda: KolodaView) -> UInt {
            //return numberOfCards
            return UInt (self.data.count)
        }
    
        func kolodaViewForCardAtIndex(koloda: KolodaView, index: UInt) -> UIView {
            //return UIImageView(image: UIImage(named: "Card_like_\(index + 1)"))
            /*return (NSBundle.mainBundle().loadNibNamed("MyView",
                owner: self, options: nil)[0] as? UIView)!*/
    
            let dataView = NSBundle.mainBundle().loadNibNamed("MyView",
                owner: self, options: nil)[0] as? MyView
             let parseData = data[Int(index)]
            dataView?.label1?.text = parseData.labelText
            dataView?.label2?.text = parseData.label2Text
    
            return dataView!
    
        }
        func kolodaViewForCardOverlayAtIndex(koloda: KolodaView, index: UInt) -> OverlayView? {
            return NSBundle.mainBundle().loadNibNamed("OverlayView",
                owner: self, options: nil)[0] as? OverlayView
        }
    
        //MARK: KolodaViewDelegate
    
        func kolodaDidSwipedCardAtIndex(koloda: KolodaView, index: UInt, direction: SwipeResultDirection) {
        //Example: loading more cards
            if index >= 3 {
                numberOfCards = 6
                kolodaView.reloadData()
            }
        }
    
        func kolodaDidRunOutOfCards(koloda: KolodaView) {
        //Example: reloading
            //kolodaView.resetCurrentCardNumber()
            loadData()
        }
    
        func kolodaDidSelectCardAtIndex(koloda: KolodaView, index: UInt) {
            UIApplication.sharedApplication().openURL(NSURL(string: "http://yalantis.com/")!)
        }
    
        func kolodaShouldApplyAppearAnimation(koloda: KolodaView) -> Bool {
            return true
        }
    
        func kolodaShouldMoveBackgroundCard(koloda: KolodaView) -> Bool {
            return true
        }
    
        func kolodaShouldTransparentizeNextCard(koloda: KolodaView) -> Bool {
            return true
        }
    
        func kolodaBackgroundCardAnimation(koloda: KolodaView) -> POPPropertyAnimation? {
            return nil
        }
    
    }
    

    This is MyView.swift

    //
    //  MyView.swift
    //
    //
    //  Created by Viorel Petrisor on 12/29/15.
    //  Copyright © 2015 Viorel Petrisor. All rights reserved.
    //
    
    import UIKit
    
    class MyView: UIView {
    
        @IBOutlet var label1: UILabel!
        @IBOutlet var label2: UILabel!
        /*
        // Only override drawRect: if you perform custom drawing.
        // An empty implementation adversely affects performance during animation.
        override func drawRect(rect: CGRect) {
            // Drawing code
        }
        */
    
    }
    

    I would deeply appreciate some help!

    opened by Viorel84 10
  • Next views

    Next views "origin point" is wrong on iOS 11

    Next views "origin point" is wrong on iOS 11

    When I build on iOS 11, the Koloda View origin point for next views is different than on iOS 10 and previous (see screenshots) koloda_ios_11

    How should it look like?

    koloda_ios_10

    Report a bug

    What did you do?

    Same build, same code, one running on iOS 11, the other on iOS 10

    What did you expect to happen?

    Origin point for next views for both OS to be the same (in the center behind the view like on iOS 10)

    What happened instead?

    Origin point for next views is off to the right. (each next view has the exact same frame size on iOS 10 and 11, tested through hierarchy inspector)

    Your Environment

    • Version of the component: 4.0
    • Swift version: 3.0
    • iOS version: 10.3.2 and 11
    • Device: iPhone 6 size for the iOS 11 device. I don't have another size iOS 11 device, and didn't try to use the new Xcode yet.
    • Xcode version: 8.3.3
    • If you use Cocoapods:

    Stack

       CocoaPods : 1.2.1
            Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
        RubyGems : 2.5.1
            Host : Mac OS X 10.12.5 (16F73)
           Xcode : 8.3.3 (8E3004b)
             Git : git version 2.13.1
    Ruby lib dir : /Users/Valentin/.rvm/rubies/ruby-2.3.0/lib
    Repositories : master - https://github.com/CocoaPods/Specs.git @ da787c5bf33b991d53ea8db6f5d47dab03dd0f0a
    

    Installation Source

    Executable Path: /Users/Valentin/.rvm/gems/ruby-2.3.0/bin/pod
    

    Plugins

    cocoapods-deintegrate : 1.0.1
    cocoapods-plugins     : 1.0.0
    cocoapods-search      : 1.0.0
    cocoapods-stats       : 1.0.0
    cocoapods-trunk       : 1.2.0
    cocoapods-try         : 1.1.0
    

    Podfile

    platform :ios, '9.0'
    use_frameworks!
    inhibit_all_warnings!
    
    def testing_pods
      pod 'Quick'
      pod 'Nimble'
    end
    
    def network_pods
      pod 'Alamofire'
      pod 'Moya'
      pod 'Moya/ReactiveCocoa'
    end
    
    def general_pods
      pod 'Argo'
      pod 'ReactiveCocoa'
      pod 'AFDateHelper'
      pod 'AsyncSwift'
      pod 'Curry'
    end
    
    def security_pods
      pod 'Locksmith'
    end
    
    def analytics_pods
      pod 'Analytics'
    end
    
    def ui_pods
      pod 'SVProgressHUD'
      pod 'JVFloatLabeledTextField'
      pod 'TPKeyboardAvoiding'
      pod 'Koloda', '4.0'
      pod 'MTCardLayout', :git => "https://github.com/Valpertui/MTCardLayout"
      pod 'Voltron', :git => "https://github.com/Valpertui/Voltron"
      pod 'Auk', :git => "https://github.com/Valpertui/VPAuk"
      pod 'Kingfisher'
      pod 'JSQWebViewController'
      pod 'Intercom'
      pod 'JSQMessagesViewController'
      pod 'JTAppleCalendar', '~> 7.0'
    end
    
    target 'Locum' do
      general_pods
      network_pods
      ui_pods
      analytics_pods
    end
    
    target 'LocumKit' do
      general_pods
      network_pods
    
      target 'LocumKitTests' do
        testing_pods
        general_pods
        network_pods
        inherit! :search_paths
      end
    end
    
    target 'LocumAppKit' do
      general_pods
      network_pods
      security_pods
    
      target 'LocumAppKitTests' do
        testing_pods
        general_pods
        network_pods
        inherit! :search_paths
      end  
    end
    
    target 'AppTests' do
        ui_pods
        testing_pods
        general_pods
        network_pods
        inherit! :search_paths
    end
    

    Project that demonstrates the bug

    Sorry I don't have the time to build a project demonstrating the issue yet.

    opened by Valpertui 9
  • Add click through functionality for KolodaView

    Add click through functionality for KolodaView

    • We wanted to display a message below the lowest card of the stack of cards, therefore we needed to be able to force a click to go through it
    • Furthermore we added the ability to add/remove the View to the NotificationCenter
    • In addition to that we needed the ability to chance all of the default values to our liking, implemented the missing fields in KolodaView
    opened by ferencbeutel4711 9
  • Kolada View leaves stains of previous view

    Kolada View leaves stains of previous view

    Screenshot 2022-08-16 at 12 24 59 PM # Report

    The more information you provide, the faster we can help you.

    ⚠️ Select what you want - a feature request or report a bug. Please remove the section you aren't interested in.

    A feature request

    What do you want to add?

    Please describe what you want to add to the component.

    How should it look like?

    Please add images.

    Report a bug

    What did you do?

    Please replace this with what you did.

    What did you expect to happen?

    Please replace this with what you expected to happen.

    What happened instead?

    Please replace this with what happened instead.

    Your Environment

    • Version of the component: insert here
    • Swift version: insert here
    • iOS version: insert here
    • Device: insert here
    • Xcode version: insert here
    • If you use Cocoapods: run pod env | pbcopy and insert here
    • If you use Carthage: run carthage version | pbcopy and insert here

    Project that demonstrates the bug

    Please add a link to a project we can download that reproduces the bug.

    opened by asadmalik210 0
  • Undo action on right/left swipe not working

    Undo action on right/left swipe not working

    Report

    Undo(revertAction(direction: .right)) action not working on right/left swipe but it working on button tapped. How can we manage undo on swipe card

    Your Environment

    • Version of the component:
    • Swift version: 5.0
    • iOS version: 14.7
    • Device: All
    • Xcode version: 12.5/13.1
    • pod "Koloda"
    opened by jaydip2021 0
  • How to allow only left swipe Any guide line for that ?

    How to allow only left swipe Any guide line for that ?

    Report

    The more information you provide, the faster we can help you.

    ⚠️ Select what you want - a feature request or report a bug. Please remove the section you aren't interested in.

    A feature request

    What do you want to add?

    Please describe what you want to add to the component.

    How should it look like?

    Please add images.

    Report a bug

    What did you do?

    Please replace this with what you did.

    What did you expect to happen?

    Please replace this with what you expected to happen.

    What happened instead?

    Please replace this with what happened instead.

    Your Environment

    • Version of the component: insert here
    • Swift version: insert here
    • iOS version: insert here
    • Device: insert here
    • Xcode version: insert here
    • If you use Cocoapods: run pod env | pbcopy and insert here
    • If you use Carthage: run carthage version | pbcopy and insert here

    Project that demonstrates the bug

    Please add a link to a project we can download that reproduces the bug.

    opened by Jerry510 1
  • How to detect the card overlaps the cross button or tick button?

    How to detect the card overlaps the cross button or tick button?

    I want to delete the card when the card overlaps the button. I have done with deleting the card but unable to find solution how can I detect the cards is overlapping the button so that on a particular condition I can delete the card.

    opened by JawadAli130 0
  • The animation is not showing when we swipe the view

    The animation is not showing when we swipe the view

    I am requesting for urgent solution for this problem and want to know what should I do in the scene.....

    How should it look like?

    it should look just like it shown in the example.

    Report a bug

    What did you do?

    i wrote code just as the example showed . added pod imported the koloda everything

    What did you expect to happen?

    The view should have been able to show swiping animation as shown in the example

    What happened instead?

    the data in the view changes as i swipe but the view doesnt show the swiping animation at all.

    Your Environment

    • Version of the component: insert here
    • Swift version: 5
    • iOS version: 14.4
    • Device: iPhone 11(Simulator)
    • Xcode version: 12
    • If you use Cocoapods: run pod env | pbcopy and insert here
    • If you use Carthage: run carthage version | pbcopy and insert here

    Project that demonstrates the bug

    Please add a link to a project we can download that reproduces the bug.

    TruthOrDare.zip

    opened by Parth-1311 1
Releases(4.3.1)
  • 4.0(Apr 19, 2017)

  • 3.1.2(Aug 22, 2016)

    • Fixed several out of bounds crashes
    • overlayStrength in OverlayView is deprecated in favor of func updateWithProgress(percentage: CGFloat)
    • Minor refactoring
    Source code(tar.gz)
    Source code(zip)
  • 3.1.1(May 10, 2016)

  • 3.0.0(Apr 4, 2016)

    This version bring major changes:

    • Ability to dynamically insert/delete/reload specific cards
    • External animator
    • Major refactoring
    • Swift 2.2 support

    Some of delegate methods were changed:

    func koloda(koloda: KolodaView, didSwipedCardAtIndex index: UInt, inDirection direction: SwipeResultDirection)
    func koloda(kolodaDidRunOutOfCards koloda: KolodaView)
    func koloda(kolodaShouldApplyAppearAnimation koloda: KolodaView) -> Bool
    func koloda(kolodaShouldMoveBackgroundCard koloda: KolodaView) -> Bool
    func koloda(kolodaShouldTransparentizeNextCard koloda: KolodaView) -> Bool
    func koloda(koloda: KolodaView, draggedCardWithFinishPercent finishPercent: CGFloat, inDirection direction: SwipeResultDirection)
    func koloda(kolodaDidResetCard koloda: KolodaView)
    func koloda(kolodaSwipeThresholdMargin koloda: KolodaView) -> CGFloat?
    

    to

    func koloda(koloda: KolodaView, didSwipeCardAtIndex index: UInt, inDirection direction: SwipeResultDirection)
    func kolodaDidRunOutOfCards(koloda: KolodaView)
    func kolodaShouldApplyAppearAnimation(koloda: KolodaView) -> Bool
    func kolodaShouldMoveBackgroundCard(koloda: KolodaView) -> Bool
    func kolodaShouldTransparentizeNextCard(koloda: KolodaView) -> Bool
    func koloda(koloda: KolodaView, draggedCardWithPercentage finishPercentage: CGFloat, inDirection direction: SwipeResultDirection) 
    func kolodaDidResetCard(koloda: KolodaView)
    func kolodaSwipeThresholdMargin(koloda: KolodaView) -> CGFloat?
    
    func koloda(kolodaBackgroundCardAnimation koloda: KolodaView) -> POPPropertyAnimation?
    

    was removed

    currentCardNumber was renamed to currentCardIndex

    Source code(tar.gz)
    Source code(zip)
Owner
Yalantis
Knowledge is power and the way to get power is by sharing knowledge. We are open source because this is a smart way to live, work and play.
Yalantis
Swipe able, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI

Swipable, customizable card stack view, Tinder like card stack view based on UICollectionView. Cards UI Сocoapods installation Add in your Podfile: po

Indy 850 Nov 17, 2022
Swipe to "like" or "dislike" any view, just like Tinder.app. Build a flashcard app, a photo viewer, and more, in minutes, not hours!

MDCSwipeToChoose Swipe to "like" or "dislike" any view, just like Tinder.app. Build a flashcard app, a photo viewer, and more, in minutes, not hours!

Brian Gesiak 2.6k Nov 29, 2022
🃏 Tinder like card interface

Features Swift 3 Custom views for the card & overlay Generic Dynamically add new cards on top or on the bottom Lazy view loading Setup pod 'DMSwipeCar

Dylan Marriott 250 Nov 15, 2022
A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.

VerticalCardSwiper A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift. Project goal and information The goal o

Joni Van Roost 1.2k Dec 28, 2022
🔥 A multi-directional card swiping library inspired by Tinder

Made with ❤️ by Mac Gallagher Features ?? Advanced swipe recognition based on velocity and card position ?? Manual and programmatic actions ?? Smooth

Mac Gallagher 754 Dec 28, 2022
Awesome iOS 11 appstore cards in swift 5.

Cards brings to Xcode the card views seen in the new iOS XI Appstore. Getting Started Storyboard Go to main.storyboard and add a blank UIView Open the

Paolo Cuscela 4.1k Dec 14, 2022
A navigation controller that displays its view controllers as an interactive stack of cards.

CardNavigation The easiest way to turn a navigation controller into an interactive stack of cards. Highlights ✅ Fully interactive and interruptible ✅

James Randolph 41 Sep 29, 2022
Card-based view controller for apps that display content cards with accompanying maps, similar to Apple Maps.

TripGo Card View Controller This is a repo for providing the card-based design for TripGo as well as the TripKitUI SDK by SkedGo. Specs 1. Basic funct

SkedGo 6 Oct 15, 2022
A swift SDK to help you scan debit/credit cards.

SKCardReader A swift SDK to help you scan debit/credit cards. Requirements To use the SDK the following requirements must be met: Xcode 11.0 or newer

Syed Kashan 4 Jul 29, 2022
Swift Package to download Transactions for LunchOnUs Cards

LunchOnUs Downloader What This is a small library to download transaction and balance data for LunchOnUs Cards (Giftcards by Eigen Development). How C

Steffen Kötte 0 Jan 15, 2022
Presenting timelines as cards, single or bundled in scrollable feed!

TimelineCards ?? Autogenerated timelines presented as cards ?? ?? Single or bundled into feed ?? Installation CocoaPods (wtf is that?) Add pod 'Timeli

0xNSHuman 428 Dec 16, 2022
Recreation of cards from Apple's AppStore written using SwiftUI.

App Store Cards Animation I tried to reproduce the look and the feeling of the cards from the AppStore. Please note that this repository is a work-in-

Roman 3 Mar 30, 2022
🃏 Cardslider is a design UI controller that allows you to swipe through cards with pictures and accompanying descriptions.

CARD SLIDER UI controller that allows you to swipe through cards with pictures. We specialize in the designing and coding of custom UI for Mobile Apps

Ramotion 1.2k Dec 19, 2022
A SwiftUI view that arranges its children in a whimsical interactive deck of cards, as seen in Big News

CardStack A SwiftUI view that arranges its children in a whimsical interactive deck of cards. CardStack mimics the behaviour of the photo stack in iMe

The Not So Big Company 74 Dec 13, 2022
Presenting timelines as cards, single or bundled in scrollable feed!

TimelineCards ?? Autogenerated timelines presented as cards ?? ?? Single or bundled into feed ?? Installation CocoaPods (wtf is that?) Add pod 'Timeli

0xNSHuman 428 Dec 16, 2022
:star: Custom card-designed CollectionView layout

CardsLayout CardsLayout is a lightweight Collection Layout. Installation CocoaPods You can use CocoaPods to install CardsLayout by adding it to your P

Filipp Fediakov 798 Dec 28, 2022
Awesome looking Dial like card selection ViewController

KVCardSelectionVC Awesome looking Dial like card selection ViewController An updated Swift 3 working version of : https://github.com/atljeremy/JFCardS

Kunal Verma 23 Feb 1, 2021
A reactive, card-based UI framework built on UIKit for iOS developers.

CardParts - made with ❤️ by Intuit: Example Requirements Installation Communication & Contribution Overview Quick Start Architecture CardsViewControll

Intuit 2.5k Jan 4, 2023
A SwiftUI based custom sheet card to show information in iOS application.

A SwiftUI based custom sheet card to show any custom view inside the card in iOS application.

Mahmud Ahsan 4 Mar 28, 2022