-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
NSLog(@"The tag %i",touch.view.tag);
if( [touch.view isKindOfClass:[UIScrollView class]] ) {
for( UIView *checkview in [self.view subviews] ) {
if( [checkview tag] == 1 ) {
infoIsVisibile = NO;
[info removeFromSuperview];
}
}
}
[super touchesBegan:touches withEvent:event];
}
有人可以帮我吗,这只会检测子视图内的触摸,而不是主视图。