Qichang He
Qichang He
@meigesir I wrote a category by Objective-C, then changed his code call my category method.
忘了贴上代码了 ``` swift func textViewDidChange(textView: YYTextView) { let sizeOpt = textView.textLayout?.textBoundingSize if let size = sizeOpt { let height = size.height + textView.textContainerInset.top + textView.textContainerInset.bottom + textView.contentInset.top + textView.contentInset.bottom self.heightConstraint.constant...
@ibireme 感谢回复!我试了用 dispatch_after 和 NSTimer ,不管延时多久,换行都有抖动。因为需求原因,文本编辑框下面还有元素,所以需要让文本框在编辑时能根据内容自动伸缩。
@BaeCheung 我试了不行哩,你那换字体解决这问题了?
@augushong php 的版本是 7.2.34
@ibireme 恩,我通过 selectedRange 搞定了。还有个问题想请教下: 最开始时,YYTextView 的 text 为空 我设置一个带有属性的 attribute string 给 textView 之后再将 textView 的 text = "" 最后再界面上再次输入文字时会保留之前设置的 attribute 请问下可以清空文字的时候同时清空 attribute?我现在的做法是先清空 attribute ,给 textView 进行一次赋值再清空文字
I found a reason why cause this error. My Xcode (Version 6.3.1) project template set GCC_NO_COMMON_BLOCKS flag to YES. If set this flag to NO, this error also be solved.
I meet the same problem, any other idea can fix this issue?