iOS巅峰之键盘回收方法
来源:互联网 发布:网络平台招商加盟 编辑:程序博客网 时间:2024/05/01 01:04
之前我们想让键盘回收, 需要设置代理, 取消第一响应者, 如果textFeild 太多使用这个方法, 不够简洁
下面介绍下endEditing:方法,该方法为UIView中的一个方法,定义为
1
- (
BOOL
)endEditing:(
BOOL
)force
官方文档译文:
Causes the view (or one of its embedded text fields) to resign the first responder status.
This method looks at the current view and its subview hierarchy for the text field that is currently the first responder. If it finds one, it asks that text field to resign as first responder. If the force parameter is set to YES, the text field is never even asked; it is forced to resign.
大意为:
注销当前view(或它下属嵌入的text fields)的first responder 状态。
该方法会在当前view以及其subview层次结构中需找当前处于first responder状态的text field。如果找到的话会注销其first responder状态,如果指定force参数为YES,则不再询问text field,而直接强制注销其first responder状态。
[self.view endEditing:YES];
键盘马上关闭
- iOS巅峰之键盘回收方法
- ios-回收键盘的方法
- iOS巅峰之NSURL 基本方法 absoluteString
- iOS巅峰之NSRunLoop
- iOS图文攻略之UITextfield 键盘回收
- ios巅峰之SQ数据库
- IOS巅峰之UICollectionView详解
- iOS巅峰之SBJSON解析
- iOS巅峰之跑马灯
- iOS巅峰之label描边
- ios 回收键盘
- IOS 键盘回收
- ios怎么回收键盘
- ios 文本键盘回收
- iOS textField 回收键盘
- iOS键盘回收
- 回收键盘的方法
- 回收键盘相关方法
- activemq
- linux驱动ioctl
- 2013杭州站C - Zhuge Liang's Password(模拟)
- Basic Calculator II
- unix学习笔记------套接字-----王保明老师的笔记
- iOS巅峰之键盘回收方法
- c语言之野指针理解
- 动态显示文件名之ListView
- iOS开发-Certificates、Identifiers和Profiles详解
- Java笔记集合之栈和队列
- HexDump
- html5通过特殊链接:打电话,发短信,发邮件
- struts2整合jfreechart
- Hadoop之数据仓库构建-Hive