<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSSegmentedCell/interiorBackgroundStyle(forSegment:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSSegmentedCell(im)interiorBackgroundStyleForSegment:"
  },
  "title" : "interiorBackgroundStyle(forSegment:)"
}
-->

# interiorBackgroundStyle(forSegment:)

Returns the interior background style for the specified segment.

```
func interiorBackgroundStyle(forSegment segment: Int) -> NSView.BackgroundStyle
```

## Parameters

`segment`

The index of the segment whose background style you want to get. This method raises an exception (<doc://com.apple.documentation/documentation/Foundation/NSExceptionName/rangeException>) if the index is out of bounds..

## Return Value

The background style to use for specified segment. See [`NSView.BackgroundStyle`](/documentation/AppKit/NSView/BackgroundStyle) for possible values.

## Discussion

The interior background style describes the surface drawn onto in [`drawInterior(withFrame:in:)`](/documentation/AppKit/NSCell/drawInterior(withFrame:in:)).

This is both an override point and a useful method to call. In a custom segment cell with a custom bezel, you can override this method to describe the surface on a per-segment basis.

---

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)