Introduction
Hello,
I have added a background view with a CAGradientLayer, and my UICollectionViewCells have a hole in them to see the background. So far, it all looks great:
The Problem
However, when I scroll to the very top (and also the very bottom) of the UICollectionView, you can see the gradient background past the top of the first cell:
Question
What is something I can do to "mask" or "constrain" the gradient background to only being visible behind the cells, and not outside of the cell's frame/bounds?
https://stackoverflow.com/questions/65526836/swift-how-to-mask-a-uicollectionviews-background-to-only-be-seen-behind-visibl January 01, 2021 at 10:04AM

没有评论:
发表评论