iOS Developer Library — Pre-Release

Developer

UIKit Framework Reference UIAccessibilityFocus Protocol Reference

Options
Deployment Target:

On This Page
Language:

UIAccessibilityFocus

The UIAccessibilityFocus informal protocol provides a way to find out whether an assistive technology, such as VoiceOver, is focused on an accessible element. More...

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import UIKit

Objective-C

@import UIKit;

Availability


Available in iOS 4.0 and later.
  • Sent after an assistive technology has set its virtual focus on the accessibility element.

    Declaration

    Swift

    func accessibilityElementDidBecomeFocused()

    Objective-C

    - (void)accessibilityElementDidBecomeFocused

    Discussion

    Override accessibilityElementDidBecomeFocused if you need to know when an assistive technology has set its virtual focus on an accessibility element.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 4.0 and later.

  • Sent after an assistive technology has removed its virtual focus from an accessibility element.

    Declaration

    Swift

    func accessibilityElementDidLoseFocus()

    Objective-C

    - (void)accessibilityElementDidLoseFocus

    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.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 4.0 and later.

  • Returns a Boolean value indicating whether an assistive technology is focused on the accessibility element.

    Declaration

    Swift

    func accessibilityElementIsFocused() -> Bool

    Objective-C

    - (BOOL)accessibilityElementIsFocused

    Return Value

    YEStrue if an assistive technology is virtually focused on the element; otherwise, NOfalse.

    Import Statement

    Swift

    import UIKit

    Availability

    Available in iOS 4.0 and later.