I want to know when a user shifts the focus away from an accessibility element. I have tried overriding the accessibilityElementDidLoseFocus()
and accessibilityElementDidBecomeFocused()
methods but the methods doesn't seem to be called upon when I navigate to other elements in VoiceOver accessibility mode. I have no idea what is wrong. Is there anything else that I should 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.