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.

llama591
  • 453
  • 5
  • 15

2 Answers2

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.

Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131
  • 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. – Kevin Aug 23 '16 at 15:36
  • 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. – Noah Witherspoon Aug 26 '16 at 20:40
  • 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. – Kevin Aug 27 '16 at 11:14
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.

Kevin
  • 1,132
  • 2
  • 13
  • 24
  • anything new regarding this ? I want to disable "Fast App Switcher" from my app it's interfering with my touch listener – Netero Feb 22 '18 at 18:49
  • @Netero 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. – Kevin Feb 23 '18 at 12:34