I want to get the number of touches made in the view. If I touch the image with one finger, I want to get the score as one, and if I touch the image with two fingers, I want to get the value as two.
I am using the following code.
- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{
NSArray *allTouches = [touches allObjects];
int count = [allTouches count];
printf("\n the count is :%d",count);
}
Here I get the score always as 1, even when I touch with two fingers.
source
share