diff --git a/README.md b/README.md index 669259f..f3186ea 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Build Status Swift 2 compatible Platform iOS -CocoaPods compatible +CocoaPods compatible License: MIT

@@ -85,7 +85,7 @@ import Tablet class MyTableViewCell : UITableViewCell, ConfigurableCell { - typealias Item = User + typealias T = User static func reusableIdentifier() -> String { return "reusable_id" @@ -95,7 +95,7 @@ class MyTableViewCell : UITableViewCell, ConfigurableCell { return 255 } - func configureWithItem(item: Item) { // item is user here + func configure(item: T) { // item is user here textLabel?.text = item.username detailTextLabel?.text = item.isActive ? "Active" : "Inactive" diff --git a/Tablet.podspec b/Tablet.podspec index c285709..943a497 100644 --- a/Tablet.podspec +++ b/Tablet.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'Tablet' - s.version = '0.3.0' + s.version = '0.4.0' s.homepage = 'https://github.com/maxsokolov/tablet' s.summary = 'Powerful type-safe tool for UITableView. Swift 2.0 is required.' diff --git a/Tablet.xcworkspace/xcuserdata/maxsokolov.xcuserdatad/UserInterfaceState.xcuserstate b/Tablet.xcworkspace/xcuserdata/maxsokolov.xcuserdatad/UserInterfaceState.xcuserstate index 1f94a17..0ab3779 100644 Binary files a/Tablet.xcworkspace/xcuserdata/maxsokolov.xcuserdatad/UserInterfaceState.xcuserstate and b/Tablet.xcworkspace/xcuserdata/maxsokolov.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Tablet/TableRowBuilder.swift b/Tablet/TableRowBuilder.swift index fed1d6a..2c6cd52 100644 --- a/Tablet/TableRowBuilder.swift +++ b/Tablet/TableRowBuilder.swift @@ -144,7 +144,7 @@ public class TableRowBuilder : RowBuilder { /** Responsible for building configurable cells of given type and passing items to them. */ -public class TableConfigurableRowBuilder : TableRowBuilder { +public class TableConfigurableRowBuilder : TableRowBuilder { public override var estimatedRowHeight: Float { return C.estimatedHeight() @@ -162,7 +162,7 @@ public class TableConfigurableRowBuilder String static func estimatedHeight() -> Float - func configureWithItem(item: Item) + func configure(_: T) } public extension ConfigurableCell where Self: UITableViewCell { diff --git a/Tests/TabletTests.swift b/Tests/TabletTests.swift index 4d5c7b9..2d9136e 100644 --- a/Tests/TabletTests.swift +++ b/Tests/TabletTests.swift @@ -47,7 +47,7 @@ struct TestTableViewCellOptions { class TestTableViewCell: UITableViewCell, ConfigurableCell { - typealias Item = TestData + typealias T = TestData static func reusableIdentifier() -> String { return TestTableViewCellOptions.ReusableIdentifier @@ -57,7 +57,7 @@ class TestTableViewCell: UITableViewCell, ConfigurableCell { return TestTableViewCellOptions.EstimatedHeight } - func configureWithItem(item: Item) { + func configure(item: T) { textLabel?.text = item.title }