문제

I have a table with cells that the user may swipe to mark them "completed". I am trying to make this accessible using VoiceOver by implementing the accessbilityScroll method.

This works fine, but I can't figure out what cell has focus when the user scrolls.

I only find information on how to change focus.

도움이 되었습니까?

해결책

Hehe, Ok. I just figured it out.

There is a protocol for this. Its called UIAccessibilityFocus

Method: accessibilityElementDidBecomeFocused:

Well, I will leave this question here to any one else that is out there struggling with this.

다른 팁

Your program can also tell where VoiceOver’s “focus” (the object that it’s dealing with) is, and when “focus” enters or leaves any given object.

For Focus Information click here

– accessibilityElementDidBecomeFocused

– accessibilityElementDidLoseFocus

– accessibilityElementIsFocused

As of iOS9, you can use

UIAccessibilityFocusedElement(UIAccessibilityNotificationVoiceOverIdentifier)

https://developer.apple.com/documentation/uikit/1615119-uiaccessibilityfocusedelement

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top