【发布时间】:2017-02-19 06:27:57
【问题描述】:
我正在尝试向我的 UITextView 添加背景图像,但似乎没有这样做的选项。我尝试添加一个带有图像作为子视图的 imageView
self.bioTextView.delegate = self
let imgView = UIImageView(frame: self.bioTextView.frame)
imgView.image = #imageLiteral(resourceName: "text_field_bio")
self.bioTextView.addSubview(imgView)
但这也不起作用。 textView 背景颜色清晰。我也尝试过将 imgView 发送到后面,但这也没有用。
【问题讨论】:
-
在textView后面放一个image view,让textview背景清晰
标签: ios swift swift3 uitextview