<!--
{
  "availability" : [
    "iOS: 18.1.0 -",
    "iPadOS: 18.1.0 -",
    "macCatalyst: 18.1.0 -",
    "visionOS: 2.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImagePlayground",
  "identifier" : "/documentation/ImagePlayground/ImagePlaygroundViewController/preferredContentSize",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Image Playground"
    ],
    "preciseIdentifier" : "c:@M@ImagePlayground@objc(cs)ImagePlaygroundViewController(py)preferredContentSize"
  },
  "title" : "preferredContentSize"
}
-->

# preferredContentSize

The preferred size for the view controller’s view.

```
@MainActor @preconcurrency override dynamic var preferredContentSize: CGSize { get set }
```

## Discussion

The view controller overrides this method to establish its preferred content
size in visionOS. Changing the value of this property has no effect in visionOS.

---

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)