2015年7月16日
摘要: UITextView 自适应高度,搬来一篇stack上的: Is there a good way to adjust the size of a UITextView to conform to its content? Say for instance I have a UITextView t 阅读全文
posted @ 2015-07-16 15:39 MichaelMao 阅读(3422) 评论(0) 推荐(0) 编辑
摘要: 原文:http://www.apkbus.com/blog-107838-45740.html 1 #import <UIKit/UIKit.h>2 3 @interface TextViewController : UIViewController <UITextViewDelegate>{4 U 阅读全文
posted @ 2015-07-16 14:21 MichaelMao 阅读(1146) 评论(0) 推荐(0) 编辑
摘要: //初始化并定义大小 UITextView *textview = [[UITextView alloc] initWithFrame:CGRectMake(20, 10, 280, 30)]; textview.backgroundColor=[UIColor whiteColor]; //背景色 阅读全文
posted @ 2015-07-16 13:43 MichaelMao 阅读(516) 评论(0) 推荐(1) 编辑
摘要: 最近做到UITextView, 在取消键盘事件上我以为和UITextField差不多,于是我这样写: 1 UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(10, 40, 280, 240)]; 2 [textVi 阅读全文
posted @ 2015-07-16 13:30 MichaelMao 阅读(803) 评论(0) 推荐(0) 编辑