---
title: "imageScaling(forSegment:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nssegmentedcontrol/imagescaling(forsegment:)"
---

# imageScaling(forSegment:)

Returns the scaling mode used to display the specified segment’s image.

## Declaration

```swift
func imageScaling(forSegment segment: Int) -> NSImageScaling
```

## Parameters

- `segment`: The index of the segment whose enabled state 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 One of the image scaling constants. For a list of possible values, see NSImageScaling. The default value is NSImageScaling.scaleProportionallyDown.

## See Also

### Configuring a segment image

- [setImage(_:forSegment:)](appkit/nssegmentedcontrol/setimage(_:forsegment:).md)
- [image(forSegment:)](appkit/nssegmentedcontrol/image(forsegment:).md)
- [setImageScaling(_:forSegment:)](appkit/nssegmentedcontrol/setimagescaling(_:forsegment:).md)
