UITableView! private let store = TopStore() private let disposeBag = DisposeBag() override func viewDidLoad() { super.viewDidLoad() self.store.items .asObservable()
.scan([]) { [weak self] (old, new) -> [String] in self?.tableView.animateRowChanges( oldData: old, newData: new) return new }.bind { [weak self] _ in } .disposed(by: self.disposeBag) } }