<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIView/frame",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIView(py)frame"
  },
  "title" : "frame"
}
-->

# frame

The frame rectangle, which describes the view’s location and size in its superview’s coordinate system.

```
var frame: CGRect { get set }
```

## Discussion

This rectangle defines the size and position of the view in its superview’s coordinate system. Use this rectangle during layout operations to set the size and position the view. Setting this property changes the point specified by the [`center`](/documentation/UIKit/UIView/center) property and changes the size in the [`bounds`](/documentation/UIKit/UIView/bounds) rectangle accordingly. The coordinates of the frame rectangle are always specified in points.

> Warning:
> If the ``doc://com.apple.uikit/documentation/UIKit/UIView/transform`` property is not the identity transform, the value of this property is undefined and therefore should be ignored.

Changing the frame rectangle automatically redisplays the view without calling its [`draw(_:)`](/documentation/UIKit/UIView/draw(_:)) method. If you want UIKit to call the [`draw(_:)`](/documentation/UIKit/UIView/draw(_:)) method when the frame rectangle changes, set the [`contentMode`](/documentation/UIKit/UIView/contentMode-swift.property) property to [`UIView.ContentMode.redraw`](/documentation/UIKit/UIView/ContentMode-swift.enum/redraw).

Changes to this property can be animated. However, if the [`transform`](/documentation/UIKit/UIView/transform) property contains a non-identity transform, the value of the [`frame`](/documentation/UIKit/UIView/frame) property is undefined and should not be modified. In that case, reposition the view using the [`center`](/documentation/UIKit/UIView/center) property and adjust the size using the [`bounds`](/documentation/UIKit/UIView/bounds) property instead.

---

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)