关闭键盘的简单方法? [英] Easy way to dismiss keyboard?

查看:20
本文介绍了关闭键盘的简单方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的表格中的许多表格单元格中散布着相当多的控件,我想知道是否有一种更简单的方法来关闭键盘,而无需遍历我的所有控件并将它们全部作为第一响应者.我想问题是.. 我如何让当前的第一响应者使用键盘?

I have quite a few controls scattered throughout many table cells in my table, and I was wondering if there's an easier way to dismiss the keyboard without having to loop through all my controls and resigning them all as the first responder. I guess the question is.. How would I get the current first responder to the keyboard?

推荐答案

尝试:

[self.view endEditing:YES];

这篇关于关闭键盘的简单方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆