<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.5.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PDFKit",
  "identifier" : "/documentation/PDFKit/PDFOutline/action",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "PDFKit"
    ],
    "preciseIdentifier" : "c:objc(cs)PDFOutline(py)action"
  },
  "title" : "action"
}
-->

# action

Returns the action performed when users click the outline.

```
var action: PDFAction? { get set }
```

## Discussion

The root outline serves only as a container for the outlines it owns; it does not have an action. Note that a `PDFOutline` object can have either an action or a destination, not both.

If the `PDFOutline` object has a destination, instead of an action,  `action` returns a [`PDFActionGoTo`](/documentation/PDFKit/PDFActionGoTo) object (this is equivalent to calling [`destination`](/documentation/PDFKit/PDFOutline/destination) on the `PDFOutline` object). For other action types, `action` returns the appropriate PDF Kit action type object, such as [`PDFActionURL`](/documentation/PDFKit/PDFActionURL).

---

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)