ios 如何在 iPad 上禁用 4 个手指手势?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5526960/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 19:26:10  来源:igfitidea点击:

How to disable 4 finger gestures on iPad?

iosipad

提问by obsoleteModel81

I'm testing an iPad on iOS 4.3, which by default uses 4 finger (up/down) gestures to switch out of apps. This interferes with an on-screen piano keyboard I'm using, however, and want to remove this gesture within the frame of the keyboard. The keyboard does not use the gesture, but it regularly disrupts input (for example, when there is multi-touch input).

我正在 iOS 4.3 上测试 iPad,它默认使用 4 个手指(向上/向下)手势来切换应用程序。但是,这会干扰我正在使用的屏幕钢琴键盘,并希望在键盘框架内删除此手势。键盘不使用手势,但它会定期中断输入(例如,当有多点触控输入时)。

回答by bobobobo

One way to detect this is you will get 4 touchesCancelledat once in a single (NSSet *)touchesevent if the person accidentally did the 4 finger swipe, and 5 touchesCancelledif the person did the 5 finger grab.

检测这种情况的一种方法是,如果该人不小心进行了 4 指滑动,您将在单个事件中一次获得4 次 touchesCancelled, 如果该人进行了 5 指抓取,则会获得5 次 touchesCancelled(NSSet *)touches

At that point you can display a dialog box in your app, telling the user how to turn off the multitasking gestures, once he switches back to the app.

此时,您可以在您的应用程序中显示一个对话框,告诉用户如何在用户切换回应用程序后关闭多任务处理手势。

回答by Dan Rosenstark

No Dice

没有骰子

This is currently impossible to do programmatically. The most complete thread on it is here:

这目前无法以编程方式完成。它最完整的螺纹是在这里:

http://www.cocos2d-iphone.org/forum/topic/28704

http://www.cocos2d-iphone.org/forum/topic/28704

and the answer, if it were true, would probably be here (it's not):

答案,如果是真的,可能就在这里(不是):

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIDevice_Class/Reference/UIDevice.html

Other Possibilities

其他可能性

The other way to go would be at leastto inform the user that they have the setting "wrong." Can you detect it? It seems you cannot:

另一种方法是至少通知用户他们的设置“错误”。你能检测出来吗?看来你不能:

iOS Multitasking gestures: Is there any way to check if the user has them turned on or not?

iOS 多任务手势:有没有办法检查用户是否打开了它们?

回答by Jordan

I believe you go to settings> general> Multitasking gestures and turn them off.

我相信你去设置>常规>多任务手势并关闭它们。