Returns a rectangle in the parent’s coordinate system that contains the position and size of itself and all child nodes.
Mac Catalyst 13.0+
The frame takes into the account the cumulative effect of the xScale, yScale, and zRotation properties of each node in the subtree.
Listing 1 shows how calculateAccumulatedFrame() can be used display the bounding box of a shape node. The child node, although smaller than its parent, is rotated by 30° so that its bounds extend beyond its parent's bounds. After childNode has been added to parentNode, a further shape node, boundingBoxNode, is created with its size based on the accumulated frame of parentNode.
Figure 1 shows the result of Listing 1 with parentNode rendered in blue, childNode rendered in red and the boundingBoxNode rendered with a dashed line.