title: Use Koloda library with Parse data source
body: <p>I'm using Koloda library (<a href="https://github.com/Yalantis/Koloda" rel="nofollow">https://github.com/Yalantis/Koloda</a>) to display data in swipe views Tinder like cards. </p>
  
  <pre><code>import UIKit
  import Koloda
  import pop
  import Parse
  import Bolts
  import ParseUI
  
  private var numberOfCards: UInt = 5
  
  
  class ViewController: UIViewController, KolodaViewDataSource,     KolodaViewDelegate {
  
      var ids : [String] = []
  
      @IBOutlet weak var kolodaView: KolodaView!
      @IBAction func undo(sender: AnyObject) {
          kolodaView?.revertAction()
  
      }
  
      @IBAction func left(sender: AnyObject) {
          kolodaView?.swipe(SwipeResultDirection.Left)
  
      }
  
      @IBAction func right(sender: AnyObject) {
          kolodaView?.swipe(SwipeResultDirection.Right)
  
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          kolodaView.dataSource = self
          kolodaView.delegate = self
  
          self.modalTransitionStyle =  UIModalTransitionStyle.FlipHorizontal
          // Do any additional setup after loading the view, typically from a nib.
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
          // Dispose of any resources that can be recreated.
      }
  
      //MARK: KolodaViewDataSource
  
  
      func kolodaNumberOfCards(koloda: KolodaView) -&gt; UInt {
          return numberOfCards
      }
  
      func kolodaViewForCardAtIndex(koloda: KolodaView, index: UInt) -&gt;  UIView {
          return UIImageView(image: UIImage(named: "Card_like_\(index + 1)"))
  
      }
  
      func kolodaViewForCardOverlayAtIndex(koloda: KolodaView, index: UInt) -&gt; 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 &gt;= 3 {
              numberOfCards = 6
              kolodaView.reloadData()
          }
      }
  
      func kolodaDidRunOutOfCards(koloda: KolodaView) {
          //Example: reloading
          kolodaView.resetCurrentCardNumber()
      }
  
      func kolodaDidSelectCardAtIndex(koloda: KolodaView, index: UInt) {
          UIApplication.sharedApplication().openURL(NSURL(string: "http://yalantis.com/")!)
      }
  
      func kolodaShouldApplyAppearAnimation(koloda: KolodaView) -&gt; Bool {
          return true
      }
  
      func kolodaShouldMoveBackgroundCard(koloda: KolodaView) -&gt; Bool {
          return true
      }
  
      func kolodaShouldTransparentizeNextCard(koloda: KolodaView) -&gt; Bool {
          return true
      }
  
      func kolodaBackgroundCardAnimation(koloda: KolodaView) -&gt; POPPropertyAnimation? {
          return nil
      }
  }
  </code></pre>
  
  <p>The above code works fine with the six images I have stored in Assets. What I want is to fill every card with data from a ParseUser (Text and a image). I've been thinking about something similar of filling a tableView with ParseData but I can't find the correct solution. This is the purpose of KolodaView:</p>
  
  <blockquote>
    <p>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 .</p>
  </blockquote>
  
  <p>Maybe there is another library to do the same.</p>