<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIAccessibilityCustomAction",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIAccessibilityCustomAction"
  },
  "title" : "UIAccessibilityCustomAction"
}
-->

# UIAccessibilityCustomAction

A custom action to perform on an accessible object.

```
@MainActor class UIAccessibilityCustomAction
```

## Overview

Apps that support custom actions can create instances of this class, specifying the user-readable name of the action and the object and selector to use when performing the action. Assistive apps display custom actions in response to specific user cues. For example, VoiceOver lets users access actions quickly using the Actions rotor.

After creating an instance of this class, add it to the <doc://com.apple.documentation/documentation/ObjectiveC/NSObject-swift.class/accessibilityCustomActions> property of an appropriate accessible object.

## Topics

### Creating a custom action

[`-  initWithName:actionHandler:`](/documentation/UIKit/UIAccessibilityCustomAction/init(name:actionHandler:))

Creates a custom action object with the specified name and action handler.

[`-  initWithName:target:selector:`](/documentation/UIKit/UIAccessibilityCustomAction/init(name:target:selector:))

Creates a custom action object with the specified name, target, and selector.

[`-  initWithName:image:actionHandler:`](/documentation/UIKit/UIAccessibilityCustomAction/init(name:image:actionHandler:))

Creates a custom action object with the specified name, image, and action handler.

[`-  initWithName:image:target:selector:`](/documentation/UIKit/UIAccessibilityCustomAction/init(name:image:target:selector:))

Creates a custom action object with the specified name, image, target, and selector.

[`-  initWithAttributedName:actionHandler:`](/documentation/UIKit/UIAccessibilityCustomAction/init(attributedName:actionHandler:))

Creates a custom action object with the specified attributed name and action handler.

[`-  initWithAttributedName:target:selector:`](/documentation/UIKit/UIAccessibilityCustomAction/init(attributedName:target:selector:))

Creates a custom action object with the specified attributed name, target, and selector.

[`-  initWithAttributedName:image:actionHandler:`](/documentation/UIKit/UIAccessibilityCustomAction/init(attributedName:image:actionHandler:))

Creates a custom action object with the specified attributed name, image, and action handler.

[`-  initWithAttributedName:image:target:selector:`](/documentation/UIKit/UIAccessibilityCustomAction/init(attributedName:image:target:selector:))

Creates a custom action object with the specified attributed name, image, target, and selector.

### Accessing the action parameters

[`name`](/documentation/UIKit/UIAccessibilityCustomAction/name)

The localized name of the action.

[`attributedName`](/documentation/UIKit/UIAccessibilityCustomAction/attributedName)

The localized name of the action as an attributed string.

[`image`](/documentation/UIKit/UIAccessibilityCustomAction/image)

An image that represents the action in assistive apps.

[`actionHandler`](/documentation/UIKit/UIAccessibilityCustomAction/actionHandler)

A handler to perform for the action.

[`target`](/documentation/UIKit/UIAccessibilityCustomAction/target)

The object that performs the action.

[`selector`](/documentation/UIKit/UIAccessibilityCustomAction/selector)

The method that performs the action.

[`Handler`](/documentation/UIKit/UIAccessibilityCustomAction/Handler)

A closure type that defines a handler to perform for an action.

### Type Properties

[`UIAccessibilityCustomActionCategoryEdit`](/documentation/UIKit/UIAccessibilityCustomAction/editCategory)

A constant that an app specifies through the category property on a UIKit accessibility custom action.

[`UIAccessibilityCustomActionCategoryEdit`](/documentation/UIKit/UIAccessibilityCustomAction/editCategory)

A constant that an app specifies through the category property on a UIKit accessibility custom action.

A constant that represents the custom action’s edit rotor category.

## Relationships

### Conforms To

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)