UITapGestureRecognizer *tap=[[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(closeClick)];
[view addGestureRecognizer:tap];
//代理方法用来确定 点击的是哪个view
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
if (touch.view==view) {
return YES;
}else{
return NO;
}
}