So I'm using this library and in the example provided only static images are used to load into each card. however I want to customize the look and feel of the each card with labels, multiples UImages etc that i will load from parse.com . How can I achieve this. the function func kolodaViewForCardAtIndex(koloda: KolodaView, index: UInt) -> UIView {
}
Only return UIview. Any suggestions.
I've done the following and it works. Create a custom interface (.xib) view and class (in my example its called "CustomView")
func koloda(kolodaNumberOfCards koloda:KolodaView) -> UInt {
return UInt(self.run.count)
}
func koloda(koloda: KolodaView, viewForCardAtIndex index: UInt) -> UIView {
let cell = NSBundle.mainBundle().loadNibNamed("CustomView", owner: self, options: nil).first as? CustomView
let runs = self.run[Int(index)]
cell!.textLabel!.text = runs.type
return cell!
}
Data source method
func kolodaViewForCardAtIndex(koloda: KolodaView, index: UInt) -> UIView
Takes any UIView. So just create the view you need(for example from xib) and return it in this method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With