Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

iPhone touchesEnded sometimes not called

I have a small game that needs to know when a user touches the screen and also when they release.

Now whilst I always get a touchesBegan event, sometimes I don't get the corresponding touchesEnded event (which is somewhat annoying).

Was just wondering if anyone else had seen this.

Posted on May 2, 2008 8:40 AM

Reply
22 replies

Sep 19, 2009 11:27 AM in response to AndyQua

if anyone interested, this is a trace I got:

2009-09-19 19:25:13.527 Test4[577:207] touched: 444.000000 271.000000 , count: 1 , timestamp: 1964.198805
2009-09-19 19:25:13.542 Test4[577:207] touched: 25.000000 48.000000 , count: 1 , timestamp: 1964.214908
2009-09-19 19:25:13.591 Test4[577:207] touch ended: 447.000000 268.000000 , count: 1

you can see two touches and only one ended, and the timestamp difference is milliseconds, so to make this work we need to adjust to a low value difference, like 0.1 seconds or something, otherwise we won't be able to use tapCount.

The solutions works for me, so if anyone interested on the code let me know.

Jose.


PS: by the way, I think it also may happens the other way round, two fast touches may give one touchBegin and two touchesEnd.

Feb 23, 2010 7:31 PM in response to AndyQua

One thing which has been a recurring theme with regards to touch input issues in my application has been simply the speed at which the timer callback is monitored.

If this is set too fast for the processing function (ie. by the time I finished processing a callback another one had already triggered) I found it appeared to 'mess' with the input events causing a tailback of them to occur and 'strange' things to happen.

Slowing down the rate at which this is called solved all my issues and might be something worth considering ...

iPhone touchesEnded sometimes not called

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.