<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIUpdateLink/addAction(handler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIUpdateLink(im)addActionWithHandler:"
  },
  "title" : "addAction(handler:)"
}
-->

# addAction(handler:)

Adds an action with the specified handler to the UI update link.

```
func addAction(handler: @escaping (UIUpdateLink, UIUpdateInfo) -> Void)
```

## Discussion

This method adds the action to the [`beforeCADisplayLinkDispatch`](/documentation/UIKit/UIUpdateActionPhase/beforeCADisplayLinkDispatch) phase. To specify a different phase, use [`addAction(to:handler:)`](/documentation/UIKit/UIUpdateLink/addAction(to:handler:)) instead.

---

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)