Iphone – Touches getting Buffered

cocoa-touchiphone

In my game When i am applying touches on my subView very fast it just buffered all the touches and detect it after some time. And it apply all the touches result at a time. Means it takes noticeable delay to detect my touches on iphone so please can any one tell me how to solve this problem. So it will detect my touch when i am doing touchesBegan. Also tell me its necessary to do hitTest in my program.

Please reply as soon as possible its very important for me.

Best Answer

This sounds like it's related to your earlier question about missing touch events when a timer was firing. As was suggested there, you need to move your processor-intensive tasks to a background thread so that the user interface can remain responsive. Make sure that the processing tasks in that background thread are granular enough that they can be interrupted when user input changes conditions.

Using hitTest is usually unnecessary with UIViews, because they do their own touch event handling. It may be required if your user is interacting with standalone CALayers.