UITextField和UITextView被键盘遮住的处理办法
来源:互联网 发布:jsp连接sql server2005 编辑:程序博客网 时间:2024/05/19 22:54
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
float offset = 0.0f;
if(self.txtField == textField)
{
offset = - 180.0f;
}
NSTimeInterval animationDuration = 0.30f;
[UIView beginAnimations:@"ResizeForKeyBoard"context:nil];
[UIView setAnimationDuration:animationDuration];
float width = self.view.frame.size.width;
float height = self.view.frame.size.height;
CGRect rect = CGRectMake(0.0f, offset , width, height);
self.view.frame = rect;
[UIView commitAnimations];
}
- (void)textFieldDidEndEditing:(UITextField *)textField
{
float offset = 0.0f;
NSTimeInterval animationDuration = 0.30f;
[UIView beginAnimations:@"ResizeForKeyBoard"context:nil];
[UIView setAnimationDuration:animationDuration];
float width = self.view.frame.size.width;
float height = self.view.frame.size.height;
CGRect rect = CGRectMake(0.0f, offset , width, height);
self.view.frame = rect;
[UIView commitAnimations];
}
- UITextField和UITextView被键盘遮住的处理办法
- UITextField和UITextView被键盘挡住的处理办法
- iOS UITextView和UITextField的键盘处理
- UITextView和UITextField退出键盘的方式
- UITextField控件处理键盘弹出时遮住输入框的问题。
- [UI控件问题] UITextField控件处理键盘弹出时遮住输入框的问题
- UITextField控件处理键盘弹出时遮住输入框的问题。
- UITextField控件处理键盘弹出时遮住输入框的问题(Andy)
- UITextField控件处理键盘弹出时遮住输入框的问题。
- UITextField控件处理键盘弹出时遮住输入框的问题
- iOS-UITextField和UITextView隐藏键盘
- iOS-UITextField和UITextView隐藏键盘
- IOS UItextfield 和 UItextView 键盘隐藏
- UItextField UITextView 有关键盘的设置
- UItextField UITextView 有关键盘的设置
- UITextField UITextView回收键盘的方法
- UITextField UITextView隐藏键盘的方法
- UITextField,UITextView回收键盘
- 模式串的快速匹配算法,kmp算法,尊重前人成果,创造新未来
- 程序员必知8大排序3大查找(一)
- 约瑟夫环
- vi代码智能提示与补全环境的配置
- android的task任务栈
- UITextField和UITextView被键盘遮住的处理办法
- android布局单位
- 浮动层如何贴住网页内容右边
- 通过 sql语句获得一个 表的备注 及 字段备注 类型
- Java Exception
- Web前端知识框架总结
- Android任务和返回栈完全解析,细数那些你所不知道的细节(来自慕课网社区论坛)
- 数据结构之队列的链表实现
- 程序员必知8大排序3大查找(二)