美文网首页
UITextView

UITextView

作者: CaptainRoy | 来源:发表于2019-08-04 16:21 被阅读0次
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