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];
}
本文标题:取消第一响应
本文链接:https://www.haomeiwen.com/subject/fohsjttx.html
网友评论