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

# isOpaque

A Boolean value that determines whether the view is opaque.

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

## Discussion

This property provides a hint to the drawing system as to how it should treat the view. If set to <doc://com.apple.documentation/documentation/Swift/true>, the drawing system treats the view as fully opaque, which allows the drawing system to optimize some drawing operations and improve performance. If set to <doc://com.apple.documentation/documentation/Swift/false>, the drawing system composites the view normally with other content. The default value of this property is <doc://com.apple.documentation/documentation/Swift/true>.

An opaque view is expected to fill its bounds with entirely opaque content—that is, the content should have an alpha value of `1.0`. If the view is opaque and either does not fill its bounds or contains wholly or partially transparent content, the results are unpredictable. You should always set the value of this property to <doc://com.apple.documentation/documentation/Swift/false> if the view is fully or partially transparent.

You only need to set a value for the opaque property in subclasses of [`UIView`](/documentation/UIKit/UIView) that draw their own content using the [`draw(_:)`](/documentation/UIKit/UIView/draw(_:)) method. The opaque property has no effect in system-provided classes such as [`UIButton`](/documentation/UIKit/UIButton), [`UILabel`](/documentation/UIKit/UILabel), [`UITableViewCell`](/documentation/UIKit/UITableViewCell), and so on.

---

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)