MessageLabel cuts off text
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- swift
- 领域
- mobile-dev
调研方向
首先,在列出的 iOS 版本上运行链接的 MessageKitIssue 测试项目,并将 MessageLabel 与 UILabel 进行比较。阅读 MessageLabel.swift,重点关注 paragraphStyle 属性所在的行,并将其尺寸计算与 MessageSizeCalculator.labelSize 进行比较。当完整文本在复现项目中保持可见时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
First of all thank you for the great library. I found the issue when MessageLabel cuts off text.
I also prepared you test project where you can easy to reproduce it. In the example I use the same method for calculation label size that we have in MessageSizeCalculator.labelSize
I found that this issue is cased by this line
mutableText.addAttribute(.paragraphStyle, value: style, range: range)
inside MessageLabel.swift file
To Reproduce
Just run test project you will see that the text is cutting off in contrast of regular UILabel
Expected behavior
Whole text should be visible
Screenshots
https://www.screencast.com/t/6ECllmkScpC
Environment
- What version of MessageKit are you using?
I use main branch (6.1.0) - What version of iOS are you running on?
iOS 14.7.1, iOS 15.2 - What version of Swift are you running on?
xCode 13.2.1, swift 5 - What device(s) are you testing on? Are these simulators?
It's possible to reproduce this issue on simulator and real devices
15.2(any simulator),
15.2 (iPhone 11)
14.7.1 (iPhone 6s) - Is the issue you're experiencing reproducible in the example app?
Yes, please use my project https://github.com/Pro2005/MessageKitIssue to understand the problem
Please help me to find correct solution because you know project better.
- 主要语言
- Swift
- 星标
- 6.3k
- 派生
- 1.2k
- 平均合并
- 12 小时 4 分钟
- 30 天内合并 PR
- 9
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MessageKit/MessageKit 的其他 Issue
-
Keyboard bug 未关闭bug?
难度 3/5 1-2 天 新手友好度 45/100
MessageKit/MessageKit#1901 ·
-
question
难度 4/5 3-5 天 新手友好度 35/100
MessageKit/MessageKit#1888 · 2 条评论 ·
-
Transparent navigation bar in messageInputBar but messagesCollectionView is not shown in these areas 未关闭feature request
难度 3/5 1-2 天 新手友好度 35/100
MessageKit/MessageKit#1884 · 1 条评论 ·
-
feature request
难度 3/5 1-2 天 新手友好度 45/100
MessageKit/MessageKit#1880 ·
-
bug?
难度 4/5 3-5 天 新手友好度 35/100
MessageKit/MessageKit#1878 ·
查看 MessageKit/MessageKit 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
-
area:general bug P1 security
难度 2/5 1-3 小时 新手友好度 75/100
uttrflow/uttrflow-swift#1333 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
maxgoedjen/secretive#840 ·
-
难度 2/5 1-3 小时 新手友好度 88/100
manaflow-ai/cmux#13763 ·