compatibility fix
This commit is contained in:
parent
08c0644e28
commit
b5f7bd25e6
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'Tablet'
|
||||
s.version = '0.2.6'
|
||||
s.version = '0.2.7'
|
||||
|
||||
s.homepage = 'https://github.com/maxsokolov/tablet'
|
||||
s.summary = 'Powerful type-safe tool for UITableView. Swift 2.0 is required.'
|
||||
|
|
|
|||
|
|
@ -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: kActionPerformedNotificationKey, object: nil)
|
||||
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(didReceiveAction), name: kActionPerformedNotificationKey, object: nil)
|
||||
}
|
||||
|
||||
deinit {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ internal enum ActionHandler<I, C> {
|
|||
public class TableRowBuilder<I, C where C: UITableViewCell> : RowBuilder {
|
||||
|
||||
private var actions = Dictionary<String, ActionHandler<I, C>>()
|
||||
private var items = [I]()
|
||||
public var items = [I]()
|
||||
|
||||
public var reusableIdentifier: String
|
||||
public var estimatedRowHeight: CGFloat
|
||||
|
|
|
|||
|
|
@ -67,13 +67,14 @@ public class 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 {
|
||||
if index < builder.numberOfRows {
|
||||
return (builder, index)
|
||||
if builderIndex < builder.numberOfRows {
|
||||
return (builder, builderIndex)
|
||||
}
|
||||
index -= builder.numberOfRows
|
||||
builderIndex -= builder.numberOfRows
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ public class Action {
|
|||
*/
|
||||
public protocol ConfigurableCell {
|
||||
|
||||
typealias Item
|
||||
associatedtype Item
|
||||
|
||||
static func reusableIdentifier() -> String
|
||||
func configureWithItem(item: Item)
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue