UIAccessibilityFocus protocol not working

I want to know when the user shifts focus from the accessibility element. I tried to override the accessibilityElementDidLoseFocus() and accessibilityElementDidBecomeFocused() methods, but the methods do not seem to be called when switching to other elements in VoiceOver accessibility mode. I have no idea what is wrong. Is there anything else I have to do to activate these methods?

 override func accessibilityElementDidBecomeFocused() { println("become focused") } override func accessibilityElementDidLoseFocus() { println("lose focus") } 

The current development is on iOS 8.1 using Swift.

0
source share

Source: https://habr.com/ru/post/1232942/


All Articles