<!--
{
  "availability" : [
    "tvOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIImageView/masksFocusEffectToContents",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIImageView(py)masksFocusEffectToContents"
  },
  "title" : "masksFocusEffectToContents"
}
-->

# masksFocusEffectToContents

A Boolean value indicating whether the floating focused appearance uses the image’s alpha channel.

```
var masksFocusEffectToContents: Bool { get set }
```

## Discussion

Set this property to <doc://com.apple.documentation/documentation/Swift/false> when using multi-layer images or when using images that are completely opaque. Set this property to <doc://com.apple.documentation/documentation/Swift/true> only when the image view contains a single-layer image with transparency. When set to <doc://com.apple.documentation/documentation/Swift/true>, the system uses the image’s alpha channel to create an appropriate floating focused appearance. For example, the system masks the shadow based on the alpha channel of the image.

The aspect ratio of the image view and its displayed image must be the same. Rendering with transparency affects performance, so enable this option only when needed.

---

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)