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

iOS 文本消息之链接URL #501

Open
jianshili opened this issue Jul 26, 2024 · 0 comments
Open

iOS 文本消息之链接URL #501

jianshili opened this issue Jul 26, 2024 · 0 comments

Comments

@jianshili
Copy link

问题1:文本消息的判断URL正则有问题,一句话中有多个链接只能识别一个,当点击链接时,却能跳转多次。

问题2: 文本字体如果是系统字体(systemFontOfSize),遵循attributedLabelDelegate该协议后,点击能准确定位到本文索引。但使用fontWithName:size: 设置字体后,点击文本不能定位到相对位置。
AttributedLabel 类下的- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event方法:CFIndex index = [self characterIndexAtPoint:[touch locationInView:self]];
index 返回类似9223372036854775807这样的值。
详情请见视频操作。

视频1: https://github.com/user-attachments/assets/fcb16ad9-0665-461b-be44-4537c2ab683e

视频2: https://github.com/user-attachments/assets/26d1b36f-4065-4391-8a51-95bc9b36132f

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

1 participant