标签:ios 多行输入 textview uitextview
在iOS中,比较偷懒的一种做法,实现文本的多行输入。并且带有自动换行的功能,可以用UITextView来比较偷懒的实现。
实现代码就比较简单:
UITextView *textView = [[UITextView alloc] initWithFrame:CGRectMake(10, 100, 100, 40)];
textView.layer.cornerRadius = 5;
textView.layer.masksToBounds = YES;
[self.view addSubview:textView];
这样实现出来虽然是投机取巧,但是效果还可以。实现的效果如下:
标签:ios 多行输入 textview uitextview
原文地址:http://blog.csdn.net/lu_ca/article/details/46607307