0

So here's some background. I have some UICollectionViewCell that have transparent backgrounds, but I still want them to have shadows, which don't really render as expected (around the view, instead of around each opaque subview\element in it) so I was thinking of taking a screenshot over the parent view and setting that as a background image to get "fake" the view being transparent. What would be the best way to do that?

Essentially:

  1. Get a screenshot of the screen below a UICollectionViewCell

  2. Clip the screenshot to the frame/bounds of the cell

I saw this post, but I doesn't seem to work for whatever reason. drawHierarchy keeps returning false. I'm also assuming it gets the entire view hierarchy, not the views below the one requested it

0 Answers0