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

# performClick(_:)

Simulates a single mouse click on the receiver.

```
func performClick(_ sender: Any?)
```

## Parameters

`sender`

The object to use as the sender of the event (if the receiver’s control view is not valid). This object must be a subclass of `NSView`.

## Discussion

This method performs the receiver’s action on its target. The receiver must be enabled to perform the action. If the receiver’s control view is valid, that view is used as the sender; otherwise, the value in `sender` is used.

The receiver of this message must be a cell of type `NSActionCell`. This method raises an exception if the action message cannot be successfully sent.

## See Also

[`var controlView: NSView?`](/documentation/AppKit/NSCell/controlView)

The view associated with the cell.



---

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)