I have an application that starts playing a sound when user touches the uiview and changing to different tones as the user slides the finger on the screen. The sound stops when the user lifts the finger.
I am using the touchesBegan, Moved and Ended Events for this.
My problem is touches Ended (and/or cancelled) is sometimes not fired properly and the sound keeps playing even after the finger is lifted from screen.
So as a workaround I would like to implement a timer that would check for the number of touches on the screen and if it is zero it will check and stop the audioplayer if playing.
I have been searching for some code that could get me the number of touches like
UITouch *touches=[self getAllTouchesonScreen];
or something :)