前面我们讲完了iOS中的两个表格控件, 现在让我们继续往下看:
1.UITextView常用属性
// 1.设置 UITextView 的文字
var text: String!
// 2.设置 UITextView 的字体大小
var font: UIFont!
// 3.设置 UITextView 的字体颜色
var textColor: UIColor!
// 4.设置 UITextView 的字体排序, 默认是从左往右
var textAlignment: NSTextAlignment
// 5.设置 UITextView 是否可编辑
var editable: Bool
// 6.设置 UITextView 是否可以点击
var selectable: Bool
// 7.设置 UITextView 的超文本样式
var dataDetectorTypes: UIDataDetectorTypes
// 8.设置 UITextView 在长按下是否可以选择不同的文字样式
var allowsEditingTextAttributes: Bool
// 9.设置 UITextView 的文本容器边界
var textContainerInset: UIEdgeInsets
// 10.设置 UITextView 是否点击编辑时把旧内容全选
var clearsOnInsertion: Bool
2.UITextView 的代理方法
// 1.该方法是用来设置 UITextView 是否可以编辑
optional func textViewShouldBeginEditing(textView: UITextView) -> Bool
// 2.该方法是用来设置 UITextView 是否可以结束编辑
optional func textViewShouldEndEditing(textView: UITextView) -> Bool