---
title: "performClick(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsbuttoncell/performclick(_:)"
---

# performClick(_:)

Simulates the user clicking the button with the pointer.

## Declaration

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

## Parameters

- `sender`: The sender of the message.

## Discussion

Discussion This method essentially highlights the button, sends the button’s action message to the target object, and then unhighlights the button. If an exception is raised while the target object is processing the action message, the button is unhighlighted before the exception is propagated out of performClick(_:).

## See Also

### Handling Events and Action Messages

- [mouseEntered(with:)](appkit/nsbuttoncell/mouseentered(with:).md)
- [mouseExited(with:)](appkit/nsbuttoncell/mouseexited(with:).md)
