<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSCell/StyleMask",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@E@NSCellStyleMask"
  },
  "title" : "NSCell.StyleMask"
}
-->

# NSCell.StyleMask

Constants for specifying what happens when a button is pressed or is displaying its alternate state.

```
struct StyleMask
```

## Overview

These contents are used by the [`highlightsBy`](/documentation/AppKit/NSButtonCell/highlightsBy) and [`showsStateBy`](/documentation/AppKit/NSButtonCell/showsStateBy) methods of [`NSButtonCell`](/documentation/AppKit/NSButtonCell).

## Topics

### Constants

[`NSNoCellMask`](/documentation/AppKit/NSCellStyleMask/NSNoCellMask)

The button cell doesn’t change.

[`pushInCellMask`](/documentation/AppKit/NSCell/StyleMask/pushInCellMask)

The button cell “pushes in” if it has a border.

[`contentsCellMask`](/documentation/AppKit/NSCell/StyleMask/contentsCellMask)

The button cell displays its alternate icon and/or title.

[`changeGrayCellMask`](/documentation/AppKit/NSCell/StyleMask/changeGrayCellMask)

The button cell swaps the “control color” (the [`controlColor`](/documentation/AppKit/NSColor/controlColor) method of `NSColor`) and white pixels on its background and icon.

[`changeBackgroundCellMask`](/documentation/AppKit/NSCell/StyleMask/changeBackgroundCellMask)

Same as `NSChangeGrayCellMask`, but only background pixels are changed.

### Initializers

[`init(rawValue:)`](/documentation/AppKit/NSCell/StyleMask/init(rawValue:))



---

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)