---
title: "interiorBackgroundStyle(forSegment:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nssegmentedcell/interiorbackgroundstyle(forsegment:)"
---

# interiorBackgroundStyle(forSegment:)

Returns the interior background style for the specified segment.

## Declaration

```swift
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

Return Value The background style to use for specified segment. See NSView.BackgroundStyle for possible values.

## Discussion

Discussion The interior background style describes the surface drawn onto in 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.

## See Also

### Specifying Segment Visual Styles

- [segmentStyle](appkit/nssegmentedcell/segmentstyle.md)
