//给界面添加了一个单击手势
UITapGestureRecognizer *tap =[[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(hiddenrightview:)];
[self.viewaddGestureRecognizer:tap];
//进行逻辑判断
-(void)hiddenrightview:(UITapGestureRecognizer *)recogin{
self.view.hidden =YES;
}
- (void)rightBtnClick{
conditionview.view.hidden=!conditionview.view.hidden;
}
UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(hiddenrightview:)];
tapGestureRecognizer.cancelsTouchesInView =NO;
[self.viewaddGestureRecognizer:tapGestureRecognizer];
-(void)hiddenrightview:(UITapGestureRecognizer *)recogin{
[self.view endEditing:YES];
}
其实只是变更了一个手势的问题