TextView TextField 上滑键盘
2015-11-18 18:00
239 查看
#pragma mark - 上滑键盘 -(BOOL)textViewShouldBeginEditing:(UITextView *)textView{ CGFloat offset = self.view.frame.size.height-(sayTextView.frame.origin.y+sayTextView.frame.size.height+216); if (offset<=0) { [UIView animateWithDuration:0.3 animations:^{ CGRect frame = self.view.frame; frame.origin.y=offset; self.view.frame=frame; }]; } return YES; } -(BOOL)textViewShouldEndEditing:(UITextView *)textView{ [UIView animateWithDuration:0.3 animations:^{ CGRect frame = self.view.frame; frame.origin.y=0.0; self.view.frame=frame; }]; return YES;
相关文章推荐
- sqlmap namespace ibatis 加载
- Shell脚本:判断当前目录下所有的文件类型
- 关于Jeecg互联网化dubbo改造方案
- 碎碎念:工作上的挑战和机遇etc.
- 关于获取IP 电脑获取准确手机获取的IP不准确
- php httpclient 获取cookie
- 八数码2
- UIlabel多行文字自动换行 (自动折行)
- Executors
- Qt程序启动画面播放(gif与swf两种动画格式) - 路上的脚印
- ngModel双向绑定的一些问题
- mongoDB 基本操作,增删改查
- 漫谈流式计算的一致性
- can you spot the memory leak
- aspx、ashx、asmx文件处理请求效率比较
- mongodb新手入门,mongodb命令学习
- ios软件开发-第一课-入门篇
- Python中的random模块
- MySQL中事务概念的简洁学习教程
- hdu4815Little Tiger vs. Deep Monkey 概率dp