码迷,mamicode.com
首页 > 其他好文 > 详细

在Xcode中代码实现退出键盘和保存历史记录

时间:2014-11-29 17:28:14      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:sp   for   on   代码   res   file   text   信息   函数   

1.通过调用函数 [self.view endEditing:YES]; 2.放弃第一响应者 [self.textFiled resignFirstResponder];//关闭键盘 3.在TextView中保存历史记录:self.textView.text = [NSString stringWithFormat:@"%@\n%@",self.outLabel.text,self.textView.text]; 其中self.outLabel.text为当前文本,self.textView.text为历史信息

在Xcode中代码实现退出键盘和保存历史记录

标签:sp   for   on   代码   res   file   text   信息   函数   

原文地址:http://www.cnblogs.com/qingpeng-ios/p/4131189.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!