Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 481
llama591 Avatar asked Feb 15 '16 20:02

llama591


2 Answers

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.

like image 86
Noah Witherspoon Avatar answered Sep 26 '22 07:09

Noah Witherspoon


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.

like image 42
Kevin Avatar answered Sep 23 '22 07:09

Kevin