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

# imageContentMode

A property that determines the layout of a background image in a view when its bounds change.

```
var imageContentMode: UIView.ContentMode { get set }
```

## Discussion

The content mode specifies how the background image adjusts when the view’s bounds change. You can use this property to specify that you want to scale the background image (either with or without distortion) or pin it to a particular spot on the view.

For a list of values you can assign to this property, see [`UIView.ContentMode`](/documentation/UIKit/UIView/ContentMode-swift.enum). The default value of this property is [`UIView.ContentMode.scaleToFill`](/documentation/UIKit/UIView/ContentMode-swift.enum/scaleToFill).

---

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)