Skip to content

Commit 5396bf9

Browse files
author
Alex Usbergo
committed
Updated README
1 parent ca03f23 commit 5396bf9

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If you are using **CocoaPods**:
1818
Add the following to your [Podfile](https://guides.cocoapods.org/using/the-podfile.html):
1919

2020
```ruby
21-
pod 'Buffer', '~> 1.1'
21+
pod 'Buffer', '~> 1.3'
2222
```
2323

2424
If you are using **Carthage**:
@@ -168,16 +168,15 @@ class ViewController: UIViewController {
168168
return tableView
169169
}()
170170

171-
lazy var elements: [AnyListItem<FooModel>] = {
172-
var elements = [AnyListItem<FooModel>]()
171+
lazy var elements: [ListItem<FooModel>] = {
172+
var elements = [ListItem<FooModel>]()
173173
for _ in 0...100 {
174174
// AnyListItem wraps the data and the configuration for every row in the tableview.
175-
let item = AnyListItem(type: UITableViewCell.self,
176-
referenceView: self.tableView,
177-
state: FooModel(text: "Foo"))) {
178-
cell, state in
179-
guard let cell = cell as? UITableViewCell else { return }
180-
cell.textLabel?.text = state.text
175+
let item = ListItem(type: UITableViewCell.self,
176+
container: self.tableView,
177+
state: FooModel(text: "Foo"))) {
178+
cell, state in
179+
cell.textLabel?.text = state.text
181180
}
182181
elements.append(item)
183182
}

0 commit comments

Comments
 (0)