Element focus change - iOS
On iOS, you can use the UIAccessibilityFocus
protocol to listen to focus changes. The accessibilityElementDidBecomeFocused
method is called whenever an element receives focus.
Be careful when using the accessibilityElementDidBecomeFocused
method: do not trigger any context change because they might confuse users.
class View: UIView {
override open func accessibilityElementDidBecomeFocused() {
// Do not change context
}
}