简体   繁体   English

如何忽略屏幕上多余的手指?

[英]How do I ignore an extra finger on the screen?

I am working on an app for small kids. 我正在为小孩子开发一个应用程序。 The app is basically an eye candy game where the kid can touch the screen and make flowers or balloons appear. 该应用基本上是一款让人眼花eye乱的游戏,孩子可以触摸屏幕,使花朵或气球出现。 I am using touchesBegan: and touchesend: to figure out when the kid is pressing down (start the animation) and when he lifts his finger up (stop the animation). 我正在使用touchesBegan:和touchesend:找出孩子何时按下(开始动画)以及何时抬起手指(停止动画)。

My problem is that, some of the kids I beta tested, with held the iPhone with their thumb on the screen. 我的问题是,一些经过我Beta测试的孩子用拇指在屏幕上握着iPhone。 This extra touch messes with my logic that controls the position of the animation. 这种额外的触感与控制动画位置的逻辑混乱。 I believe I can take care of this with one of two methods 我相信我可以使用以下两种方法之一来解决此问题

  1. setting exclusive touch so that once the first finger is down, all other touches are ignored, thus forcing the child to lift their thumb up if they want to make the game do anything. 设置独占触摸,以便一旦第一根手指放下时,所有其他触摸都将被忽略,从而如果孩子想让游戏执行任何操作,则迫使其抬起拇指。

  2. by capturing the position of the touch begin and making sure that in my touch end logic, I am responding to the correct finger. 通过捕获触摸开始的位置并确保在触摸结束逻辑中,我正在响应正确的手指。

I was just curious if anyone else has run into this problem and if they had come up with a better approach. 我只是好奇是否有人遇到了这个问题,以及他们是否提出了更好的方法。

I went with #1 "setting exclusive touch so that once the first finger is down, all other touches are ignored, thus forcing the child to lift their thumb up if they want to make the game do anything." 我采用了#1的方式:“设置排他触摸,以便一旦第一根手指放下时,所有其他触摸都将被忽略,从而如果孩子想让游戏做任何事情,则迫使其举起拇指。” I tested it with a few kids and very quickly they figured out what the "rules" were and adapted. 我对几个孩子进行了测试,很快他们就知道了“规则”是什么并进行了改编。

What age group? 什么年龄段的人? From observing 1-, 3-, and 5-year olds with touch screen phones, it seems to me that at the age where the child could be trusted to hold the phone and not drop it (late two or early three) they can learn how to hold the phone on a palm. 从用触摸屏手机观察1、3和5岁的孩子来看,在我看来,可以信任的孩子握住手机而不放下手机的年龄(两岁或三岁初),他们可以学习如何将手机放在手掌上 The ones who need to grip can easily, after being shown only once in most cases, learn to grip with the thumb from the top and bottom areas where there is no screen. 在大多数情况下只需要显示一次之后,需要握住的人就可以轻松地从没有屏幕的顶部和底部学会用拇指握住。

I agree that your app should handle the errant input intelligently, but don't discount minimum instruction in the general use of the phone (holding it) first. 我同意您的应用应智能处理错误的输入,但不要在手机的一般使用(保留它)中优先考虑最低限度的说明。 This isn't a case of 'fix the user' but rather a skill that the user (the child) will need to use any app on the phone. 这不是“固定用户”的情况,而是用户(孩子)需要使用手机上任何应用程序的技能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在屏幕上的某个点与用户的手指位置之间建立一条线连接? - How do I make a line connect between a certain point on the screen, to the user's finger location? 如何识别手指何时从屏幕上抬起? - How to recognise when a finger was lifted from the screen? 在UITableView中用手指在屏幕上绘制 - Drawing in screen with finger in UITableView 手指在 iPad 屏幕上滑动 - Finger Swipe On iPad Screen 如何使用“顺序手指检测”的新iOS 9.2 Touch ID功能 - How do I use the new iOS 9.2 Touch ID feature of “sequential finger detection” 如何在 ios 10 theos 中使用 BiometricKit 框架开始监控指纹? - How do I start monitor for finger prints using BiometricKit framework in ios 10 theos? touchesMoved,如何让我的视线追上-并保持在手指下? - touchesMoved, how do I make my view catch up - and stay under the finger? 如何检测手指已经触摸屏幕多长时间了iOS - How to detect how long a finger has been touching the screen iOS 在Cocos2D中,我如何检测手指被按下? - In Cocos2D how do I detect that finger is being held down? 如何区分用户是用手指还是苹果铅笔点击屏幕? - How to differentiate whether a user is tapping the screen with his finger or an apple pencil?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM