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

# NSActionCell

An active area inside a control.

```
class NSActionCell
```

## Overview

An [`NSActionCell`](/documentation/AppKit/NSActionCell) does three things: it displays text or an icon; it provides the target object and action method used by its [`NSControl`](/documentation/AppKit/NSControl) object; and it handles mouse (cursor) tracking by properly highlighting its area and sending action messages to its target based on cursor movement.

The [`controlView`](/documentation/AppKit/NSCell/controlView) of an [`NSActionCell`](/documentation/AppKit/NSActionCell) is the view in which the receiver was last drawn.

### Obtaining and Setting Cell Values

The [`floatValue`](/documentation/AppKit/NSCell/floatValue), [`intValue`](/documentation/AppKit/NSCell/intValue), and [`integerValue`](/documentation/AppKit/NSCell/integerValue) methods return the value with their corresponding types after validating any editing of cell content. If the cell is not a text-type cell or the cell value is not scannable to the appropriate type, these return 0.

The [`stringValue`](/documentation/AppKit/NSCell/stringValue) method returns the receiver’s value as a string object as converted by the cell’s formatter, if one exists. If no formatter exists and the value is an <doc://com.apple.documentation/documentation/Foundation/NSString>, returns the value as a plain, attributed, or localized formatted string. If the value is not an `NSString` or cannot be converted to one, returns an empty string. The method supplements the [`NSCell`](/documentation/AppKit/NSCell) implementation by validating and retaining any editing changes being made to cell text.

Calling `setObjectValue:` discards any editing of the receiver’s text and sets its object value to the specified object. After doing so, if the object value is different from what it was before the method was invoked, the method marks the receiver as needing redisplay.

### Configuring an NSActionCell Object

The `NSActionCell` implementation of [`setFloatingPointFormat:left:right:`](/documentation/AppKit/NSCell/setFloatingPointFormat:left:right:) supplements the `NSCell` implementation by marking the receiver as needing redisplay after discarding any editing changes that were being made to cell text.

## Topics

### Assigning the Target and Action

[`action`](/documentation/AppKit/NSActionCell/action)

Returns the receiver’s action-message selector.

[`target`](/documentation/AppKit/NSActionCell/target)

Returns the receiver’s target object.

### Assigning a Tag

[`tag`](/documentation/AppKit/NSActionCell/tag)

Returns the receiver’s tag.



---

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)