1
我有一個使用RxSwift實現UITableView的問題。RxSwift,RxCocoa和UITableview
我試圖使用下面的代碼將模型數組的observable綁定到表項。 models.bind(to: self.tableView.rx.items(cellIdentifier: "Cell", cellType: ModelTableViewCell.self
。
但是,當我這樣做給我以下錯誤:Type 'inout UITableView' does not conform to protocol 'ReactiveCompatible'
,我知道錯誤不能正確,因爲NSObject擴展ReactiveCompatible,所以UITableView也。另外,我的項目代碼與RxSwiftCommunity
上顯示的示例沒有太大區別。我創建了一個有錯誤的小示例項目。