Skip to content

Commit fb78718

Browse files
authored
Merge pull request #125 from touyu/touyu-patch-1
Update README.md for Swift3
2 parents b2b4b01 + f544e05 commit fb78718

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ RxSwift helps alleviate some of the burden with a simple data binding mechanism:
3636
```swift
3737
let data = Observable<[String]>.just(["first element", "second element", "third element"])
3838

39-
data.bindTo(tableView.rx.items(cellIdentifier: "Cell")) { index, model, cell in
39+
data.bind(to: tableView.rx.items(cellIdentifier: "Cell")) { index, model, cell in
4040
cell.textLabel?.text = model
4141
}
4242
.disposed(by: disposeBag)
@@ -51,7 +51,7 @@ With RxDataSources, it is super easy to just write
5151
```swift
5252
let dataSource = RxTableViewSectionedReloadDataSource<SectionModel<String, Int>>()
5353
Observable.just([SectionModel(model: "title", items: [1, 2, 3])])
54-
.bindTo(tableView.rx.items(dataSource: dataSource))
54+
.bind(to: tableView.rx.items(dataSource: dataSource))
5555
.disposed(by: disposeBag)
5656
```
5757
![RxDataSources example app](https://raw.githubusercontent.com/kzaher/rxswiftcontent/rxdatasources/RxDataSources.gif)
@@ -115,7 +115,7 @@ let sections = [
115115
]
116116

117117
Observable.just(sections)
118-
.bindTo(tableView.rx.items(dataSource: dataSource))
118+
.bind(to: tableView.rx.items(dataSource: dataSource))
119119
.disposed(by: disposeBag)
120120
```
121121

0 commit comments

Comments
 (0)