-
Notifications
You must be signed in to change notification settings - Fork 144
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
fix: sizeWithTemplateItem:measureSize: return abnormal size #451
fix: sizeWithTemplateItem:measureSize: return abnormal size #451
Conversation
…ain multiline text
|
@jingcheng1988 这个pr有问题吗?你们是否也遇到了size计算不对的问题 |
我这边review一下开源的代码,在main分支上提供轻量化的处理方案,你可以验证一下是否修复了你的问题 |
demo.zip |
根据你提供的模板和数据,我进行本地模拟,得出的结果如下: 创建的视图和实际计算出来的尺寸是一致的 |
我这边复现了一下,发现是一个临界case,最终的原因是由于 paraStyle.lineBreakMode = NSLineBreakByCharWrapping; // 生成AttributedString
|
#445