We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
图文混排的时候selectionView可以定在此位置,但是只要一输入selectionView就换行跑到下面去了,很影响使用体验,在demo中测试也是这样,点q处光标还是能回去,但是再输入光标又跑下去了,请问我该如何做,能使光标不跑到图片前面
The text was updated successfully, but these errors were encountered:
修改光标位置可以这样:
UITextRange *range = [YYTextRange rangeWithRange:textView.selectedRange affinity:YYTextAffinityForward]; [textView setSelectedTextRange:range];
其中 YYTextAffinityForward 表示光标在字符前,YYTextAffinityBackward 表示光标在字符后。
YYTextAffinityForward
YYTextAffinityBackward
至于自动调整位置这个,以后会尝试做一下优化。
Sorry, something went wrong.
如果用self.textView.exclusionPaths来做插入图片,在最后解析成文本传给后台的时候,是不是不好拿到图片插入的rang?
遍历 textLayout.lines 然后一点点算出来。。是很麻烦。
No branches or pull requests
图文混排的时候selectionView可以定在此位置,但是只要一输入selectionView就换行跑到下面去了,很影响使用体验,在demo中测试也是这样,点q处光标还是能回去,但是再输入光标又跑下去了,请问我该如何做,能使光标不跑到图片前面
The text was updated successfully, but these errors were encountered: