UITextView
override func viewDidLoad() {
super.viewDidLoad()
let textTextView = UITextView(frame: CGRect(x: 20.0, y: 60.0, width: 200.0, height: 100.0))
textTextView.layer.borderWidth = 1.0
textTextView.layer.borderColor = UIColor.gray.cgColor
self.view.addSubview(textTextView)
textTextView.isEditable = false
textTextView.text = "第一行\n电话:15811227327\n邮箱:email@icloud.com www.baidu.com"
textTextView.dataDetectorTypes = .all // 电话 网址等
}
本文标题:UITextView
本文链接:https://www.haomeiwen.com/subject/acsydctx.html
网友评论