UIAccessibility​Action

A set of methods that accessibility elements can use to support specific actions.

Overview

The UIAccessibilityAction informal protocol provides a way for accessibility elements to support specific actions, such as selecting values in a range or scrolling through information on the screen. For example, to respond to a scrolling gesture, you implement the accessibility​Scroll(_:​) method and post UIAccessibility​Page​Scrolled​Notification with the new page status (such as “Page 3 of 9”). Or, to make an element such as a slider or picker view accessible, you first need to characterize it by including the UIAccessibility​Trait​Adjustable trait. Then, you must implement the accessibility​Increment() and accessibility​Decrement() methods. When you do this, assistive technology users can adjust the element using gestures specific to the assistive technology.

Symbols

Performing an Action

func accessibility​Activate()

Tells the element to activate itself and report the success or failure of the operation.

func accessibility​Increment()

Tells the accessibility element to increment the value of its content.

func accessibility​Decrement()

Tells the accessibility element to decrement the value of its content.

func accessibility​Scroll(UIAccessibility​Scroll​Direction)

Scrolls screen content in an application-specific way and returns the success or failure of the action.

func accessibility​Perform​Escape()

Dismisses a modal view and returns the success or failure of the action.

Accessing Custom Actions

var accessibility​Custom​Actions:​ [UIAccessibility​Custom​Action]?

An array of custom actions to display along with the built-in actions.

Constants

UIAccessibility​Scroll​Direction

The direction of a scrolling action.

See Also