I want to check if CAShapeLayer
is visible on screen or not. Does anybody now how to do?
Asked
Active
Viewed 94 times
0

shraddha11
- 783
- 4
- 17
-
```isHidden```? – udi Jul 26 '22 at 15:04
1 Answers
0
You can't (easily) tell if any of its content is actually visible, but you can see if it is contained by another layer by checking its superlayer
property, and check if it's hidden by checking its isHidden
property.
Even if it is not hidden and is a sublayer of a layer that's onscreen, it might be covered by other opaque layers. Figuring out if any of its pixels are visible would be much more complex.

Duncan C
- 128,072
- 22
- 173
- 272