UICollectionView Cell Shadow

后端 未结 4 1184
长情又很酷
长情又很酷 2021-02-06 02:07

I am trying to add shadow to my custom UICollectionViewCell, This is the code I am using in my custom collection view cell class:

self.layer.shadowO         


        
4条回答
  •  庸人自扰
    2021-02-06 02:41

    cell.layer.backgroundColor should not be clear color

    try

    cell.layer.backgroundColor = UIColor.white.cgColor
    

提交回复
热议问题