<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "QuartzCore",
  "identifier" : "/documentation/QuartzCore/CALayer/frame",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core Animation"
    ],
    "preciseIdentifier" : "c:objc(cs)CALayer(py)frame"
  },
  "title" : "frame"
}
-->

# frame

The layer’s frame rectangle.

```
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 the[`bounds`](/documentation/QuartzCore/CALayer/bounds), [`anchorPoint`](/documentation/QuartzCore/CALayer/anchorPoint) and [`position`](/documentation/QuartzCore/CALayer/position) properties. When you assign a new value to this property, the layer changes its [`position`](/documentation/QuartzCore/CALayer/position) and [`bounds`](/documentation/QuartzCore/CALayer/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`](/documentation/QuartzCore/CALayer/transform) property applies a rotation transform that is not a multiple of 90 degrees.

For more information about the relationship between the [`frame`](/documentation/QuartzCore/CALayer/frame), [`bounds`](/documentation/QuartzCore/CALayer/bounds), [`anchorPoint`](/documentation/QuartzCore/CALayer/anchorPoint) and [`position`](/documentation/QuartzCore/CALayer/position) properties, see [Core Animation Programming Guide](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CoreAnimation_guide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40004514).

> Note:
> The `frame` property is not directly animatable. Instead you should animate the appropriate combination of the ``doc://com.apple.quartzcore/documentation/QuartzCore/CALayer/bounds``, ``doc://com.apple.quartzcore/documentation/QuartzCore/CALayer/anchorPoint`` and ``doc://com.apple.quartzcore/documentation/QuartzCore/CALayer/position`` properties to achieve the desired result.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)