-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint pt = [touch locationInView:self.view];
if (!CGRectContainsPoint([self.view frame], pt)) {
NSLog(@"点pt不在self.view上");
}else{
NSLog(@"点pt在self.View上");
}
}
时间: 2024-10-25 21:10:13