I've got a UIButton in my IOS app that I'm trying to remove when users have Voiceover enabled. I'm able to hide it, but it still appears in the Voiceover swipe list AND is still selectable, if I happen to click in that area of the screen. I've tried:
self.chevronButton.isHidden = true
self.chevronButton.isEnabled = false
self.chevronButton.isAccessibilityElement = false
self.chevronButton.alpha = 0
self.chevronButton.accessibilityElementsHidden = true
UIAccessibility.post(notification: UIAccessibility.Notification.layoutChanged, argument: nil)
This only seems to make the button invisible. How can I remove it from the Voiceover swipe list and make it so that is cannot be selected by touch?