I'm building a simple card game where cards are flicked onto a central pile, and I'd like to begin removing the bottom cards when the number gets too large. However, I apply some random rotation and positioning to each card, meaning the corners of some of them stick out, etc. Here's a screenshot:
What I'd like to do is ascertain whether any portion of a view is visible to the user, and remove any that are completely covered by other views.
The views are all instantiated, they are all inside the same superview, and they are all within the bounds of the view, so using these methods will not work. I need to find out if a view has been completely covered by other views, at which point I can safely remove it without the user seeing something vanish.