Converts the rectangle from the specified layer’s coordinate system to the receiver’s coordinate system.
- iOS 2.0+
- macOS 10.5+
- Mac Catalyst 13.0+Beta
- tvOS 9.0+
- Core Animation
A point specifying a location in the coordinate system of
The layer with
rin its coordinate system. The receiver and
land must share a common parent layer. This parameter may be
The rectangle converted to the receiver’s coordinate system.
If you specify
nil for the
l parameter, this method returns the original rect with an origin subtracted from the layer's frame's origin.
Listing 1 shows code that creates two layers,
yellow is scaled so that it is half of its original size.
Figure 1 shows the two layers and an overlaid rectangle with a frame of
(50, 50, 200, 200) in the red layer's coordinate system.
Listing 2 show how you can find the coordinates of that rectangle in the yellow layer's coordinate system.