首页 > 其他 > 详细

用视图上移解决UITextField/UITextView被键盘遮盖问题

时间:2015-03-18 21:51:21      阅读:401      评论:0      收藏:0      [点我收藏+]

先看看UILabel/UITextField/UITextView的区别:

UILabel 显示的文本只读,无法编辑,可以根据文字个数自动换行;
UITextField 可编辑本文,但是无法换行,只能在一行显示;当点击键盘上的return时会收到一个事件做一些事情。
UITextView 可编辑文本,提供换行功能。

解决UITextField/UITextView被键盘遮盖问题可以主要参考https://gist.github.com/ruandao/9429305

先记着,有时间做一些整理


参考链接:

https://gist.github.com/ruandao/9429305

https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html

How to make UITextField move up when keyboard is present

用视图上移解决UITextField/UITextView被键盘遮盖问题

原文:http://my.oschina.net/ioslighter/blog/388601

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!