去掉屏幕键盘的方法
来源:未知 责任编辑:智问网络 发表时间:2013-09-26 23:53 点击:次

//定义两个文本框
UITextField *textName;
UITextField *textSummary;
//点击return 按钮 去掉
-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
[textField resignFirstResponder];
return YES;
}
//点击屏幕空白处去掉键盘
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[self.textName resignFirstResponder];
[self.textSummary resignFirstResponder];
}
摘自 like7xiaoben
相关新闻>>
- 发表评论
-
- 最新评论 更多>>
今日头条
更多>>您可能感兴趣的文章
- iPhone开发学习笔记006—— NSNotification自定义通知名
- ios学习笔记(二)xcode 4.3.2下实现基本交互
- iphone开发之object c基础一定义接口
- Memory on the iPhone
- Lexical or Preprocessor Issue 'xxx.h
- (iPhone/iPad开发)presentViewController相应方法在SDK5.0前后
- ios开发问题:添加库和复制其它工程文件编译错误问题
- Android:实现TabWidget选项卡按钮在屏幕下方
- 多线程之NSInvocationOperation
- iPhone应用开发之十一:常用的三种动画表现效果