The view’s frame rectangle, which defines its position and size in its superview’s coordinate system.
- macOS 10.0+
Changing the value of this property repositions and resizes the view within the coordinate system of its superview. Changing the frame does not mark the view as needing to be displayed. Set the
needs property to
true when you want the view to be redisplayed.
If your view does not use a custom bounds rectangle, this method also sets the view’s bounds to match the size of the new frame. You can specify a custom bounds rectangle by changing the
bounds property or by calling the
set method explicitly. Once set, the view creates an internal transform to convert from frame coordinates to bounds coordinates. As long as the width-to-height ratio of the two coordinate systems remains the same, your content appears normal. If the ratios differ, your content may appear skewed.
The frame rectangle may be rotated relative to its superview’s coordinate system. For more information, see the
Changing the value of this property results in the posting of an
frame to the default notification center if the view is configured to do so.