Compare commits

...

1 Commits

Author SHA1 Message Date
Max Sokolov b5f7bd25e6 compatibility fix 2016-05-13 17:28:27 +03:00
6 changed files with 9 additions and 8 deletions

View File

@ -1,6 +1,6 @@
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Tablet' s.name = 'Tablet'
s.version = '0.2.6' s.version = '0.2.7'
s.homepage = 'https://github.com/maxsokolov/tablet' s.homepage = 'https://github.com/maxsokolov/tablet'
s.summary = 'Powerful type-safe tool for UITableView. Swift 2.0 is required.' s.summary = 'Powerful type-safe tool for UITableView. Swift 2.0 is required.'

View File

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

View File

@ -46,7 +46,7 @@ internal enum ActionHandler<I, C> {
public class TableRowBuilder<I, C where C: UITableViewCell> : RowBuilder { public class TableRowBuilder<I, C where C: UITableViewCell> : RowBuilder {
private var actions = Dictionary<String, ActionHandler<I, C>>() private var actions = Dictionary<String, ActionHandler<I, C>>()
private var items = [I]() public var items = [I]()
public var reusableIdentifier: String public var reusableIdentifier: String
public var estimatedRowHeight: CGFloat public var estimatedRowHeight: CGFloat

View File

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

View File

@ -99,7 +99,7 @@ public class Action {
*/ */
public protocol ConfigurableCell { public protocol ConfigurableCell {
typealias Item associatedtype Item
static func reusableIdentifier() -> String static func reusableIdentifier() -> String
func configureWithItem(item: Item) func configureWithItem(item: Item)