<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIApplication/sendAction(_:to:from:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIApplication(im)sendAction:to:from:forEvent:"
  },
  "title" : "sendAction(_:to:from:for:)"
}
-->

# sendAction(_:to:from:for:)

Sends an action message identified by the selector to a specified target.

```
func sendAction(_ action: Selector, to target: Any?, from sender: Any?, for event: UIEvent?) -> Bool
```

## Parameters

`action`

A selector identifying an action method. See the discussion for information on the permitted selector forms.

`target`

The object to receive the action message. If `target` is `nil`, the app sends the message to the first responder, from whence it progresses up the responder chain until it is handled.

`sender`

The object that is sending the action message. The default sender is the [`UIControl`](/documentation/UIKit/UIControl) object that invokes this method.

`event`

A [`UIEvent`](/documentation/UIKit/UIEvent) object that encapsulates information about the event originating the action message.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if a responder object handled the action message, <doc://com.apple.documentation/documentation/Swift/false> if no object in the responder chain handled the message.

## Discussion

Normally, this method is invoked by a [`UIControl`](/documentation/UIKit/UIControl) object that the user has touched. The default implementation dispatches the action method to the given target object or, if no target is specified, to the first responder. Subclasses may override this method to perform special dispatching of action messages.

By default, this method pushes two parameters when calling the target. These last two parameters are optional for the receiver because it is up to the caller (usually a [`UIControl`](/documentation/UIKit/UIControl) object) to remove any parameters it added. This design enables the action selector to be one of the following:

- `- (void)action`
- `- (void)action:(id)sender`
- `- (void)action:(id)sender forEvent:(UIEvent *)event`

---

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)