<!--
{
  "availability" : [
    "macOS: 10.7.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableCellView/backgroundStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTableCellView(py)backgroundStyle"
  },
  "title" : "backgroundStyle"
}
-->

# backgroundStyle

This property is automatically set by the enclosing row view to let this view know what its background looks like.

```
var backgroundStyle: NSView.BackgroundStyle { get set }
```

## Discussion

The property is automatically set by the enclosing [`NSTableRowView`](/documentation/AppKit/NSTableRowView) to let this view know what its background looks like. For instance, when the `backgroundStyle` is NSBackgroundStyleDark, the view should use a light text color.

The default implementation automatically forwards calls to all subviews that implement `setBackgroundStyle:` or are an NSControl, which have `NSCell` classes that respond to [`backgroundStyle`](/documentation/AppKit/NSCell/backgroundStyle).

---

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)