rj2700
rj2700

Reputation: 1965

Swift - disable accessibility voiceover?

I was curious if there was a way to disable the voiceover accessibility (or any other type of accessibility feature for that matter - like hear aids, captioning, etc.) in swift?

Essentially, I'm trying to build an application that has a very high likelihood of being used by people with visual impairments and I've tailored my entire application for such people.

But given that this target group may have the voiceover accessibility feature on, can I disable that only within my application?

enter image description here

I see that on xcode 7, underneath the identity inspector, there is a section for accessibility (picture below) and I tried unchecking that box but it seems like voiceover and the highlighting focus feature are still in effect. Let me know if you have any suggestions or comments, thanks.

Upvotes: 4

Views: 4387

Answers (2)

D. Pratt
D. Pratt

Reputation: 464

This can also be accomplished in storyboard (See photo).

I came across this thread because I was trying to do this for on a game scene tucked inside of a view container. To get it to work, I was able to set

.accessibilityTraits = UIAccessibilityTraitAllowsDirectInteraction

on each SKNode that had custom accessibility created for it, and then was able to select the proper options (again see screenshot) on the SKView -> View in Storyboard to allow the game screen to work.

Accessibility Options

Upvotes: 1

xoogler
xoogler

Reputation: 211

You can set

element.accessibilityTraits = UIAccessibilityTraitAllowsDirectInteraction 

on any elements that you want to provide custom audio/interactions for.

Upvotes: 5

Related Questions