Previous 1 2 Next 22 Replies Latest reply: Jul 27, 2010 7:37 AM by cemaleker Go to original post
  • jmgomezg Level 1 (0 points)
    Hi, having the same issue, yes, touchesEnded sometimes is not called if we tap too fast, but I am working on a solution which works for me:

    as we get a UIEvent, we can read the UIEvent.timestamp property (we also get a timestamp on the UITouch reference), and ignore any second touch which goes too fast. We can also try to ignore if there is finally a touchesEnded event, saving an array of references of ignored touches.

    Hope it can help anyone.

  • jmgomezg Level 1 (0 points)
    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.


    PS: by the way, I think it also may happens the other way round, two fast touches may give one touchBegin and two touchesEnd.
  • FrenzyOrange Level 1 (0 points)
    Hi there! Are any news on this problem? Just have the same trouble, and accelerometer-update solution is a little bit crutchy for me.
  • kiplring Level 1 (0 points)
    This is BIG bug.
    If you(apple) can't fix it, please add a function that can check the current touch state of iPhone.
  • Marc Vaughan Level 1 (0 points)
    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 ...
  • gonk Level 1 (0 points)
    I'm still getting this same bug in iOS4, which I have been seeing since at least as far back as 2.2.1. Has anyone found a solution?
  • Lazrhog1 Level 1 (0 points)
    If you run your game/app as a thread, timing the gap between execution times and running your main loop with updates based on the delta time (dt), then you don't drop touches anymore.

    Hope that helps.
  • cemaleker Level 1 (0 points)
    Here is my solution.

    Check touch phase of waiting touches when a new touch began. Discard touches with phase "UITouchPhaseEnded".

    It worked for me. Hope this one helps you.

Previous 1 2 Next