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

# center

The center point of the view’s frame rectangle.

```
var center: CGPoint { get set }
```

## Discussion

The center point is specified in points in the coordinate system of its superview. Setting this property updates the origin of the rectangle in the [`frame`](/documentation/UIKit/UIView/frame) property appropriately.

Use this property, instead of the [`frame`](/documentation/UIKit/UIView/frame) property, when you want to change the position of a view. The center point is always valid, even when scaling or rotation factors are applied to the view’s transform.   Changes to this property can be animated.

---

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)