iOS Developer Library

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.

Inheritance


Not Applicable

Import Statement


Swift

import UIKit

Objective-C

@import UIKit;

Availability


Available in iOS 5.0 and later.
  • A string that identifies the element. (required)

    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.

    Import Statement

    Objective-C

    @import UIKit;

    Swift

    import UIKit

    Availability

    Available in iOS 5.0 and later.