Swift类似宏定义

来源:互联网 发布:a 寻路算法 c 编辑:程序博客网 时间:2024/05/22 14:14

    //类似宏定义

    let Collection_Cell = "CollectionCell"

   //注册单元格self.Collection_Cell

   collectionView.registerClass(CollectionViewCell.self, forCellWithReuseIdentifier:self.Collection_Cell)

   // 找可用单元格self.Collection_Cell

   var cell = collectionView.dequeueReusableCellWithReuseIdentifier(self.Collection_Cell, forIndexPath: indexPath) as? CollectionViewCell


0 0
原创粉丝点击