<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppIntents",
  "identifier" : "/documentation/AppIntents/ShortcutsUIButton/addTarget(_:action:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "App Intents",
      "UIKit"
    ],
    "preciseIdentifier" : "c:@M@_AppIntents_UIKit@objc(cs)ShortcutsUIButton(im)addTarget:action:forControlEvents:"
  },
  "title" : "addTarget(_:action:for:)"
}
-->

# addTarget(_:action:for:)

```
@MainActor @preconcurrency override final func addTarget(_ target: Any?, action: Selector, for controlEvents: UIControl.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)