美文网首页
swift 自定义cell

swift 自定义cell

作者: 可乐小子 | 来源:发表于2024-01-29 17:30 被阅读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!

相关文章

网友评论

      本文标题:swift 自定义cell

      本文链接:https://www.haomeiwen.com/subject/toagodtx.html