Created
August 27, 2015 04:26
-
-
Save klundberg/9f8f5a0d4921cf2ab3b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct TableViewSection<T, Cell: UITableViewCell> { | |
var cellIdentifier: String = "" | |
var items: [T] = [] | |
var configureCell: (cell: Cell, item: T, indexPath: NSIndexPath) -> Void | |
} | |
class TableViewDataSource: NSObject, UITableViewDataSource { | |
var sections: [TableViewSection<?, ?>] = [] // I want arbitrary T/Cell types here, what do? | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment