Dismiss keyboard by touching background of view
发布日期:2021-09-23 03:31:40 浏览次数:18 分类:技术文章

本文共 403 字,大约阅读时间需要 1 分钟。

http://stackoverflow.com/questions/2321038/dismiss-keyboard-by-touching-background-of-uitableview

UITapGestureRecognizer *gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard)];

[self.view addGestureRecognizer:gestureRecognizer];

[gestureRecognizer release];

- (void) hideKeyboard {

    [textfield1 resignFirstResponder];
    [textfield2 resignFirstResponder];
}

转载地址:https://blog.csdn.net/aminoph/article/details/9301495 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:The connection to adb is down, and a severe error has occured.
下一篇:java tomcat 环境变量

发表评论

最新留言

初次前来,多多关照!
[***.217.46.12]2024年04月25日 02时47分58秒