UICollectionView Cell Shadow

后端 未结 4 1182
长情又很酷
长情又很酷 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:37

    Don't forget to add these 2 lines

    self.clipsToBounds = false      
    self.layer.masksToBounds = false
    

提交回复
热议问题