UIAccessibilityFocus Protocol Reference
(informal protocol)
| Adopted by | |
| Framework | /System/Library/Frameworks/UIKit.framework |
| Companion guide | |
| Declared in | UIAccessibility.h |
Overview
The UIAccessibilityFocus informal protocol provides a way to find out whether an assistive technology, such as VoiceOver, is focused on an accessible element.
VoiceOver and other assistive technologies place a virtual focus on elements, which allows users to inspect an element without activating it. If you know the current location of the virtual focus, you can optimize the user experience for assistive technology users. For example, if your application expects people to tap once to select an object and then double-tap to activate it, VoiceOver users must make an extra tap to focus VoiceOver on the object before tapping to select it. To improve the VoiceOver user’s experience, you can move selection to an element at the same time VoiceOver focuses on the element. In this way, the user can activate the element without having to tap again to select the element.
Instance Methods
accessibilityElementDidBecomeFocused
Sent after an assistive technology has set its virtual focus on the accessibility element.
Discussion
Override accessibilityElementDidBecomeFocused if you need to know when an assistive technology has set its virtual focus on an accessibility element.
Availability
- Available in iOS 4.0 and later.
Declared In
UIAccessibility.haccessibilityElementDidLoseFocus
Sent after an assistive technology has removed its virtual focus from an accessibility element.
Discussion
Override accessibilityElementDidLoseFocus if you need to know when an assistive technology has removed its virtual focus from an accessibility element. Note that accessibilityElementDidLoseFocus is sent before accessibilityElementDidBecomeFocused.
Availability
- Available in iOS 4.0 and later.
Declared In
UIAccessibility.haccessibilityElementIsFocused
Returns a Boolean value indicating whether an assistive technology is focused on the accessibility element.
Return Value
YES if an assistive technology is virtually focused on the element; otherwise, NO.
Availability
- Available in iOS 4.0 and later.
Declared In
UIAccessibility.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-05-18)