Skip to content

Commit dabe45c

Browse files
committed
Removes deprecated APIs.
1 parent df7073c commit dabe45c

4 files changed

+9
-9
lines changed

Example/Example1_CustomizationUsingTableViewDelegate.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ class CustomizationUsingTableViewDelegate : UIViewController {
6969

7070
Observable.just(sections)
7171
.bind(to: tableView.rx.items(dataSource: dataSource))
72-
.addDisposableTo(disposeBag)
72+
.disposed(by: disposeBag)
7373

7474
tableView.rx.setDelegate(self)
75-
.addDisposableTo(disposeBag)
75+
.disposed(by: disposeBag)
7676
}
7777
}
7878

Example/Example2_RandomizedSectionsAnimation.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ class PartialUpdatesViewController: UIViewController {
5757

5858
randomSections
5959
.bind(to: animatedTableView.rx.items(dataSource: tvAnimatedDataSource))
60-
.addDisposableTo(disposeBag)
60+
.disposed(by: disposeBag)
6161

6262
randomSections
6363
.bind(to: tableView.rx.items(dataSource: reloadDataSource))
64-
.addDisposableTo(disposeBag)
64+
.disposed(by: disposeBag)
6565

6666
let (configureCollectionViewCell, configureSupplementaryView) = PartialUpdatesViewController.collectionViewDataSourceUI()
6767
let cvAnimatedDataSource = RxCollectionViewSectionedAnimatedDataSource(
@@ -71,7 +71,7 @@ class PartialUpdatesViewController: UIViewController {
7171

7272
randomSections
7373
.bind(to: animatedCollectionView.rx.items(dataSource: cvAnimatedDataSource))
74-
.addDisposableTo(disposeBag)
74+
.disposed(by: disposeBag)
7575

7676
// touches
7777

@@ -84,7 +84,7 @@ class PartialUpdatesViewController: UIViewController {
8484
.subscribe(onNext: { item in
8585
print("Let me guess, it's .... It's \(item), isn't it? Yeah, I've got it.")
8686
})
87-
.addDisposableTo(disposeBag)
87+
.disposed(by: disposeBag)
8888
}
8989
}
9090

Example/Example3_TableViewEditing.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ class EditingExampleViewController: UIViewController {
4949
.map {
5050
$0.sections
5151
}
52-
.shareReplay(1)
52+
.share(replay: 1)
5353
.bind(to: tableView.rx.items(dataSource: dataSource))
54-
.addDisposableTo(disposeBag)
54+
.disposed(by: disposeBag)
5555
}
5656

5757
override func viewDidAppear(_ animated: Bool) {

Example/Example4_DifferentSectionAndItemTypes.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class MultipleSectionModelViewController: UIViewController {
3333

3434
Observable.just(sections)
3535
.bind(to: tableView.rx.items(dataSource: dataSource))
36-
.addDisposableTo(disposeBag)
36+
.disposed(by: disposeBag)
3737
}
3838
}
3939

0 commit comments

Comments
 (0)