文本在UITextView框边界下滚动

时间:2018-03-12 09:33:28

标签: ios swift uitextview uitextviewdelegate

错误示例

enter image description here

此UITextView的设置: textView.clipToBounds = true

代表

func textViewDidEndEditing(_ textView: UITextView) {
    changeUIViewStyle(textView, borderWidth: 0, cornerRadius: 0, boderColor: UIColor.defaulfGray)
}

func changeUIViewStyle(_ view: UIView, borderWidth: CGFloat, cornerRadius: CGFloat, boderColor: UIColor?) {
    view.borderWidth = borderWidth
    view.cornerRadius = cornerRadius // If this line is commented, then bug will gone
    view.borderColor = boderColor
}

为什么吗 如果更改了角半径线,则bug将消失。

0 个答案:

没有答案