Returns a copy of the presentation layer object that represents the state of the layer as it currently appears onscreen.
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+
- tvOS 9.0+
- Core Animation
A copy of the current presentation layer object.
The layer object returned by this method provides a close approximation of the layer that is currently being displayed onscreen. While an animation is in progress, you can retrieve this object and use it to get the current values for those animations.
superlayer properties of the returned layer return the corresponding objects from the presentation tree (not the model tree). This pattern also applies to any read-only layer methods. For example, the
hit method of the returned object queries the layer objects in the presentation tree.