touchesEnded example

- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
if ([touches count] == 1)
{
UITouch * touch = [touches anyObject];

if ([touch tapCount] == 1)
{

NSLog(@"Touch on");

CGPoint point = [touch locationInView:self.view];

UIImageView *view = nil;
NSArray *subviews = [scrollView1 subviews];

for (view in subviews)
{
if(CGRectContainsPoint(view.frame, point))
{

NSLog(@"gotchs");

}
}


}

}
}

Post a Comment