Open Slience2015 opened 8 years ago
与这个应该完全没关系啊。。
YYTextView 由于需要多余换行符来显示光标,计算高度稍微麻烦些,推荐用 sizeThatFit 之类的直接调整;或者,先在字符串后面添加 "\r" 再计算。
@ibireme 刚才试了sizeThatFit之类的直接调整,高度还是不对;在字符串后面添加 "\r" 再计算也一样
对了, 我是把textView当做了tableView的headerView,计算出高度之后设置为headerView的高度
用demo测试了一下,还是textView.scrollEnabled = true时计算正常,textView.scrollEnabled = false就不准确了
这个就不清楚了,scrollEnabled 与内容和高度应该都没关系。。 如果还有问题就换成 YYLabel 吧。
YYTextView 设置(文本比较长)
之后 ,计算高度
计算出来的高度不准确 设置
就好了。这个是为什么呀?