frame
The layer’s frame rectangle.
Declaration
var frame: CGRect { get set }Discussion
The frame rectangle is position and size of the layer specified in the superlayer’s coordinate space. For layers, the frame rectangle is a computed property that is derived from the values in thebounds, anchorPoint and position properties. When you assign a new value to this property, the layer changes its position and bounds properties to match the rectangle you specified. The values of each coordinate in the rectangle are measured in points.
Do not set the frame if the transform property applies a rotation transform that is not a multiple of 90 degrees.
For more information about the relationship between the frame, bounds, anchorPoint and position properties, see Core Animation Programming Guide.