Skip to content

Instantly share code, notes, and snippets.

@ksmandersen
ksmandersen / gist:4d3530eeacd9c41786e5
Created August 4, 2014 09:24
Workaround for: Generic Array DataSource
public class ArrayDataSource<CellType: UIView, ItemType> {
private var items: [ItemType]
private var cellReuseIdentifier: String
private var configureClosure: (CellType, ItemType) -> Void
private var proxy: DataSourceProxy!
private unowned var view: UIView
public init(view: UIView, items: [ItemType], cellReuseIdentifier: String, configureClosure: (CellType, ItemType) -> Void) {
self.items = items
self.cellReuseIdentifier = cellReuseIdentifier