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

# alternateImage

The image the button displays in its alternate state.

```
var alternateImage: NSImage? { get set }
```

## Discussion

The value of this property is the image displayed by the button when it’s in its alternate state, or `nil` if there is no alternate image. Note that some button types don’t display an alternate image. Buttons don’t display images by default. Setting this property may redraw the contents of the button.

## See Also

[`image`](/documentation/AppKit/NSCell/image)

The image displayed by the cell, if any.

[`keyEquivalent`](/documentation/AppKit/NSButtonCell/keyEquivalent)

The button’s key-equivalent character.

[`-  setButtonType:`](/documentation/AppKit/NSButtonCell/setButtonType(_:))

Sets how the button highlights while pressed and how it shows its state.



---

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)