In the sample code shown in that page, a PhotosViewController DisposeBag is used (which does not exist at that moment either):
newPhotos
.ignoreElements()
.subscribe(onCompleted: { [weak self] in
self?.updateNavigationIcon()
})
.disposed(by: photosViewController.bag)
instead of the MainViewController’s one:
newPhotos
.ignoreElements()
.subscribe(onCompleted: { [weak self] in
self?.updateNavigationIcon()
})
.disposed(by: bag)