我正在学习RxSwift,我想用UxollectionView使用RxDataSources,但没有显示,请告诉我哪里错了,谢谢; 我的代码:
----模型----
EndDate
08:16:25
07:16:21
----数据-----
struct Traveler {
let name: String
let avater: UIImage?
}
struct Travelers {
var travelers: [Traveler]
}
extension Travelers: SectionModelType {
typealias Item = Traveler
var items: [Traveler] { return travelers }
init(original: Travelers, items: [Traveler]) {
self = original
travelers = items
}
}
----查看-----
let items = Variable<[Travelers]>([
Travelers(travelers: [Traveler(name: "Bob", avater: UIImage(named: "pic1"))])
])
谢谢,我想用UICollectionView显示一些人的用户。