UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(resignFirst)];
[self.view addGestureRecognizer:tap];
- (void)resignFirst
{
[[UIApplication sharedApplication].keyWindow endEditing:YES];
}
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(resignFirst)];
[self.view addGestureRecognizer:tap];
{
[[UIApplication sharedApplication].keyWindow endEditing:YES];
}