swift 自定义cell

2024-01-29  本文已影响0人  可乐小子

let cellID : String = "ZZMoneyCollectionSectionTwoViewCell"
var cell : ZZMoneyCollectionSectionTwoViewCell? = collectionView.dequeueReusableCell(withReuseIdentifier: cellID, for: indexPath) as? ZZMoneyCollectionSectionTwoViewCell
if cell == nil {
cell = ZZMoneyCollectionSectionTwoViewCell.initWithCollectionViewCell(collectionView, indexPath as NSIndexPath, cellID)
}
if indexPath.row <= self.moneyDetailModel.convertible.count{
let model: ZZMoneyConvertibleModel = self.moneyDetailModel.convertible[indexPath.row]
cell?.update(model: model)
}
cell?.evaluteCellLeftPadding(row: indexPath.row)
return cell!

上一篇 下一篇

猜你喜欢

热点阅读