判断某个点是否在某个view上
-(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上");
}
}