Merge pull request #10 from maxsokolov/develop

support swift 2.2
This commit is contained in:
Max Sokolov 2016-03-22 22:43:26 +04:00
commit f652ba085f
6 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode7.2
osx_image: xcode7.3
branches:
only:
- master

View File

@ -32,6 +32,7 @@ Tablet respects cells reusability feature and built with performace in mind. See
- iOS 8.0+
- Xcode 7.0+
- Swift 2.2
## Installation

View File

@ -37,7 +37,7 @@ public class TableDirector: NSObject, UITableViewDataSource, UITableViewDelegate
self.tableView.delegate = self
self.tableView.dataSource = self
NSNotificationCenter.defaultCenter().addObserver(self, selector: "didReceiveAction:", name: TabletNotifications.CellAction, object: nil)
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(didReceiveAction), name: TabletNotifications.CellAction, object: nil)
}
deinit {

View File

@ -81,13 +81,14 @@ public class TableSectionBuilder {
// MARK: Internal
func builderAtIndex(var index: Int) -> (RowBuilder, Int)? {
func builderAtIndex(index: Int) -> (RowBuilder, Int)? {
var builderIndex = index
for builder in builders {
if index < builder.numberOfRows {
return (builder, index)
if builderIndex < builder.numberOfRows {
return (builder, builderIndex)
}
index -= builder.numberOfRows
builderIndex -= builder.numberOfRows
}
return nil

View File

@ -102,7 +102,7 @@ public class Action {
*/
public protocol ConfigurableCell {
typealias Item
associatedtype Item
static func reusableIdentifier() -> String
static func estimatedHeight() -> Float