先说一下我的视图现在的结构
控制器的view上添加有textView ,textField,点击弹出键盘后,点击视图的其他位置,让键盘回收.
---------------------------------------------------------------------------------------------------------------------------------------------------------
//在点击需要收回键盘的视图添加单击手势
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(reKeyBoard)];
[self.view addGestureRecognizer:tap];//实现方法//取消textView ,textField的第一响应者即可
- (void)reKeyBoard
{
[_introduceGroupField resignFirstResponder];
[_nameGroupField resignFirstResponder];
}