Skip to content

Instantly share code, notes, and snippets.

@kitasuke
Created December 28, 2016 00:53
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 kitasuke/f8834cdcc91895d21fba24082a0c76e8 to your computer and use it in GitHub Desktop.
Save kitasuke/f8834cdcc91895d21fba24082a0c76e8 to your computer and use it in GitHub Desktop.
import UIKit
import RxSwift
import RxCocoa
extension Reactive where Base: UITableView {
func items<S: Sequence, Cell: UITableViewCell, O: ObservableType>
(cellType: Cell.Type)
-> (_ source: O)
-> (_ configureCell: @escaping (Int, S.Iterator.Element, Cell) -> Void)
-> Disposable
where O.E == S {
return items(cellIdentifier: String(describing: cellType), cellType: cellType)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment