NSObject(PSPDFLocalizedAccessibility)

@interface NSObject (PSPDFLocalizedAccessibility)

Extends NSObject with an accessibility helper.

  • This property sets the accessibilityIdentifier with the value set, and then uses the value as the key for obtaining a localized string and setting it as the accessibilityLabel.

    If this property is queried, the accessibilityIdentifier is returned.

    Warning

    Do not pass the string through PSPDFLocalize before assigning it to this property. Set the key and it will be localized internally.

    Note

    If the object does not comply to the UIAccessibilityIdentification protocol, we fall back to only setting the label and also returning the label.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *pspdf_accessibility;

    Swift

    var pspdf_accessibility: String? { get set }