<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: -",
    "tvOS: 17.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIContentUnavailableConfiguration-swift.struct/ImageProperties-swift.struct/maximumSize",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "s:5UIKit33UIContentUnavailableConfigurationV15ImagePropertiesV11maximumSizeSo6CGSizeVvp"
  },
  "title" : "maximumSize"
}
-->

# maximumSize

A maximum size for the image.

```
var maximumSize: CGSize { get set }
```

## Discussion

The default value is <doc://com.apple.documentation/documentation/CoreGraphics/CGSizeZero>. Setting a <doc://com.apple.documentation/documentation/CoreFoundation/CGSize/width> or <doc://com.apple.documentation/documentation/CoreFoundation/CGSize/height> of zero makes the size unconstrained on that dimension. If the image exceeds [`maximumSize`](/documentation/UIKit/UIContentUnavailableConfiguration-swift.struct/ImageProperties-swift.struct/maximumSize) size on either dimension, the view reduces its size proportionately, maintaining aspect ratio.

---

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)