Post

Replies

Boosts

Views

Activity

Reply to VoiceOver focus jumping around when adding UIViewController as Child to another UIViewController
I was able to brute force the system into not doing this by calling parent.navigationController?.navigationBar.accessibilityElementsHidden = true parent.view.accessibilityElementsHidden = true parent.addChild(self) parent.view.addSubview(self.view) self.didMove(toParent: parent) Later on, once I've configured my view a little, and then presented the child view I reset all the values using the following: DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { [weak self] in parent.navigationController?.navigationBar.accessibilityElementsHidden = false parent.view.accessibilityElementsHidden = false UIAccessibility.post(notification: .layoutChanged, argument: SOME_UI_VIEW) }
Oct ’24