【发布时间】:2015-12-04 16:22:44
【问题描述】:
将RxTableViewSectionedAnimatedDataSource 用于UITableView 的rx_itemsAnimatedWithDataSource() 时出现以下错误。
这是错误的屏幕截图:
无法使用参数列表调用“rx_itemsAnimatedWithDataSource” 类型 '(RxTableViewSectionedAnimatedDataSource)'
需要一个类型为“(DataSource)”的参数列表
self.dataSource 的类型为:
RxTableViewSectionedAnimatedDataSource< DateSelectorSectionModel>
这是为DateSelectorSectionModel 生成的接口,以及相关类型:
typealias DateSelectorSectionModel = SectionModel<SectionDesc, SectionDesc>
enum SectionType {
case StartDate, EndDate, TimeZone, AllDay
}
enum SectionState {
case Present, Missing, Dirty
}
enum SectionSelection {
case NotSelected, Selected
}
struct SectionDesc {
var type: SectionType
var state: SectionState
var selectionState: SectionSelection
init(type: SectionType, state: SectionState, selection: SectionSelection)
public func getSectionModel() -> DateSelectorSectionModel
}
extension EventDetailsDateSelectorViewModel {
public var rows: RxCocoa.Driver<[DateSelectorSectionModel]> { get }
}
有什么想法吗?谢谢!
【问题讨论】:
标签: ios swift uitableview rx-swift