<!--
{
  "availability" : [
    "iOS: 8.0.0 - 10.0.0",
    "iPadOS: 8.0.0 - 10.0.0",
    "macCatalyst: 13.1.0 - 13.1.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIUserNotificationCategory/actions(for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIUserNotificationCategory(im)actionsForContext:"
  },
  "title" : "actions(for:)"
}
-->

# actions(for:)

Returns the actions to be displayed for the given notification context.

```
func actions(for context: UIUserNotificationActionContext) -> [UIUserNotificationAction]?
```

## Parameters

`context`

The context in which the notification is displayed. Notifications can have a default context or a minimal context depending on whether the notification was just delivered or the user is looking at it in more detail.

## Return Value

An array of [`UIUserNotificationAction`](/documentation/UIKit/UIUserNotificationAction) objects to be displayed in the specified context. The order of the objects in the array represents the order that they are displayed in the resulting notification.

## Discussion

This method returns the actions associated with the specified display context. To set the actions for a given context, you must create a [`UIMutableUserNotificationCategory`](/documentation/UIKit/UIMutableUserNotificationCategory) object and use its setActions:forContext: method to specify your actions.

---

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)