4

Is there a way to identify programmatically if the user has the "zoom" accessibility feature toggled on?

I'm referring to the feature where you can:

  • Double-tap three fingers to toggle zoom on off
  • Drag with three finger to change scroll area of the screen.
  • Use two fingers to scroll on current area of the screen.

When zoom is toggle on and screen is zoomed there is no change in UIScreen.main.scale

Something similar to UAZoomEnabled from the MacOs UniversalAccess.

Pichirichi
  • 1,440
  • 11
  • 15
  • 1
    I'm not aware of a way, but if your goal is to warn the user that your app uses gestures that conflict with Zoom, you can call `UIAccessibility.registerGestureConflictWithZoom()` and the OS will provide a message to the user if they have zoom enabled. You shouldn't try to provide your own messaging. See details at https://stackoverflow.com/questions/69088232/how-to-registergestureconflictwithzoom-correctly (But it's a good question if you want to adapt your app rather than ask the user to disabled zoom.) – Rob Napier Nov 09 '21 at 17:14
  • I would like to disable ads to users that enable this feature. What you are suggesting is an interesting work around, I'll investigate this. – Pichirichi Nov 10 '21 at 08:21
  • @RobNapier `UIAccessibility.registerGestureConflictWithZoom()` won't help. it is just a one time message to the user. The function `override func touchesCancelled(_ touches: Set, with event: UIEvent?)` is triggered when an external touch event is happening so it might suggest the user is using zoom but it is not 100% guarantee. I've submitted to apple a feature request. – Pichirichi Nov 22 '21 at 09:47

0 Answers0