Skip to content
New issue

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

使用YYTextView当有 ❤️ 表情时,设置selectedRange出现错误。 #594

Open
DuckDeck opened this issue Apr 1, 2022 · 4 comments

Comments

@DuckDeck
Copy link

DuckDeck commented Apr 1, 2022

可以看下图,其实表情比如😂 这些是Ok的,但是 ❤️ 表情是错误的。设置selectedRange是2时应该是在文字后面,但是 YYTextView把光标放在❤️ 表情后面

Screen Shot 2022-04-01 at 5 33 45 PM

IMG_4780

@Svyanto
Copy link

Svyanto commented Apr 1, 2022 via email

@huangyuding
Copy link

huangyuding commented Apr 1, 2022 via email

@DuckDeck
Copy link
Author

DuckDeck commented Apr 1, 2022

另外 YYTextView 的selectedRange 返回的不是string的count ,而是unicodeScalars的长度,如果里面有表情,selectedRange和string的count长度是对不上的,有什么 办法转换一下吗

@huangyuding
Copy link

huangyuding commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants