Disabling the 3D Touch Task Switcher Gesture on the Left Edge of the Screen
Asked Answered
M

2

6

If you press firmly on the left edge of the screen using an iPhone with 3D touch you will bring up the task switcher.

I'd like to know how I can disable this behavior in my app.

Mighty answered 15/2, 2016 at 20:5 Comment(0)
L
2

There is no API for that, just as there isn’t one for disabling any other way of getting out of your app. If you’d like such a thing, you can file an enhancement request with a description of what you’re trying to do.

Levitt answered 15/2, 2016 at 20:17 Comment(3)
Is there a way for a user to disable this? If it can't be done via an API, then it might be just as effective to inform users how to disable the feature themselves.B
They could turn down their 3D Touch sensitivity or turn it off entirely in the Accessibility settings, but that’s a very heavy hammer. I wouldn’t recommend suggesting it.Levitt
Yeah, I meant "disabling the Task Switcher Gesture without disabling 3D Touch entirely", considering I would guess that the motivation of the original post is to gather force data from that area without the app switching out.B
B
1

While there isn't an API for this, it appears that the behavior is constrained to Portrait mode. If you run Apple's TouchCanvas example, you'll see that the gesture doesn't actually work because the app runs in Landscape mode. If you modify the project to support both Portrait and Landscape, you can see the gesture is enabled in Portrait, and disabled in Landscape.

So, that may be a suitable workaround, depending on your use case.

I've filed a Radar for this at https://bugreport.apple.com, suggesting that Apple offers an API similar to being able to set:

self.navigationController?.interactivePopGestureRecognizer.enabled = false

and would suggest that you do the same if seeing the feature is of interest to you. They'll probably close duplicates, but voicing more support couldn't hurt.

B answered 27/8, 2016 at 11:24 Comment(2)
anything new regarding this ? I want to disable "Fast App Switcher" from my app it's interfering with my touch listenerAlduino
@Alduino My bug report was closed without comment from Developer Relations, but my original suggestion still stands: file a bug with them yourself as well. The more people who request the feature, the more likely it is to be taken seriously.B

© 2022 - 2024 — McMap. All rights reserved.