Skip to content

Instantly share code, notes, and snippets.

@kakajika
Created February 27, 2019 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kakajika/ac7645880c65ae30540fbf1dc0c2795b to your computer and use it in GitHub Desktop.
Save kakajika/ac7645880c65ae30540fbf1dc0c2795b to your computer and use it in GitHub Desktop.
let itemsSubject = PublishSubject.create<[Item]>()
itemsSubject
.bind(to: tableView.rx.items(...)}
.disposed(by: disposeBag)
// 値を流す(空の配列なので何も表示されない)
itemsSubject.onNext([])
// 値を流す(2つの要素を表示)
itemsSubject.onNext([Item(), Item()])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment