1.VC中重载touchesBegain事件,然后在里面执行:[self.view endEditing:YES]
2.如果不方便取到当前view,可以使用[[UIApplication sharedApplication] sendAction:@selector(resignFirstResponser) to:nil from:nil forEvent:nil];
3.[[[UIApplication sharedApplication] keyWindow] endEditing:YES];