Below is the code am using
let creatorProvider = BasicProvider(
dataSource: dataSource,
viewSource: ClosureViewSource(
viewGenerator: { (data, index) -> CreatorsCollectionViewCell in
return CreatorsCollectionViewCell.init()
},
viewUpdater: { (cell: CreatorsCollectionViewCell, data, index) in
cell.initData(user: data)
}),
sizeSource: { index, data, collectionSize in
// 2. return size for each StoryItemCell here
return CGSize(width: 64, height: 64)
})