iOS Developer Library — Prerelease

Developer

UIKit Framework Reference UIAccessibilityIdentification Protocol Reference

Options
Deployment Target:

On This Page
Language:

UIAccessibilityIdentification

The UIAccessibilityIdentification protocol is used to associate a unique identifier with elements in your user interface. You can use the identifiers you define in UI Automation scripts because the value of accessibilityIdentifier corresponds to the return value of the name method of UIAElement.

  • A string that identifies the element.

    Declaration

    Swift

    var accessibilityIdentifier: String? { get set }

    Objective-C

    @property(nonatomic, copy) NSString *accessibilityIdentifier

    Discussion

    An identifier can be used to uniquely identify an element in the scripts you write using the UI Automation interfaces. Using an identifier allows you to avoid inappropriately setting or accessing an element’s accessibility label.

    Availability

    Available in iOS 5.0 and later.