Can't set shadow on UICollectionViewCell and have rounded corners. Can only make one work at a time
问题 I have a UICollectionViewCell subclass and I need to round its corners and add a shadow as well. The cell looks like a square card, and the cells have a good amount of space in-between them. So "underneath" every cell, I would like to add some shadow. I can successfully do this, but then my cell only has rounded corners on the bottom. The top just has normal corners. I need rounded corners for all four corners. I have found solutions on here for UIViews that recommend adding a separate UIView