如何在 iPad 上禁用 4 个手指手势? [英] How to disable 4 finger gestures on iPad?

查看:240
本文介绍了如何在 iPad 上禁用 4 个手指手势?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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).

推荐答案

检测此问题的一种方法是您将在单个 (NSSet *)touches 中一次获得 4 touchesCancelledcode> 事件,如果该人不小心进行了 4 指滑动,并且 5 touchesCancelled 如果该人进行了 5 指抓取.

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

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

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.

这篇关于如何在 iPad 上禁用 4 个手指手势?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆