Comments (9)
在UUMessageFrame预计算size的时候,记得也需要转换文案计算size
https://github.com/ZhipingYang/UUChatTableView/blob/master/Class/UUMessageFrame.m#L44
from uuchattableview.
嗯嗯,这个是表情cell的显示问题。我在发送图片后图片上带文字这个问题还是没有得到解决。。。
from uuchattableview.
发送完图片之后,我一滚动列表,就会出现图片上出现其他cell上的文字的问题
from uuchattableview.
那就是cell复用问题了啊,这个demo可能还有不严谨的地方。😬
https://github.com/ZhipingYang/UUChatTableView/blob/master/Class/UUMessageCell.m#L181
这个地方, 设置title是错误的,应该是AttributeTitle
switch (message.type) {
case UUMessageTypeText:
[self.btnContent setTitle:message.strContent forState:UIControlStateNormal];
break;
case UUMessageTypePicture:
{
self.btnContent.backImageView.hidden = NO;
self.btnContent.backImageView.image = message.picture;
self.btnContent.backImageView.frame = CGRectMake(0, 0, self.btnContent.frame.size.width, self.btnContent.frame.size.height);
[self makeMaskView:self.btnContent.backImageView withImage:normal];
}
from uuchattableview.
title这个问题我更改过来了
case UUMessageTypeText:
{
NSMutableAttributedString *attributedMessage = [[NSMutableAttributedString alloc] initWithString:message.strContent attributes:@{ NSFontAttributeName: [UIFont systemFontOfSize:14.0], NSForegroundColorAttributeName: [UIColor grayColor] }];
[PPStickerDataManager.sharedInstance replaceEmojiForAttributedString:attributedMessage font:[UIFont systemFontOfSize:14.0]];
[self.btnContent setAttributedTitle:attributedMessage forState:UIControlStateNormal];
// [self.btnContent setTitle:message.strContent forState:UIControlStateNormal];
}
break;
您可以在我出现这个问题提供个思路吗?我只要一设置按钮文字为富文本就会出现上述问题,用纯文本就没有问题
from uuchattableview.
这个demo主要提供一个思路,还有很多功能没有完善。。。哈哈哈,所以也没有做成 CocoaPods,问题解决了,就close吧
from uuchattableview.
from uuchattableview.
UILabel的text和attributeText是两个不同的属性,不显示需要需要两个都置空。最简单的做法就是在cell的prepareForReuse 方法中恢复cell的初始状态
from uuchattableview.
from uuchattableview.
Related Issues (20)
- 表情键盘功能 HOT 13
- 语音播放“breakpoint” HOT 3
- 自定义表情键盘与tableview的约束性问题 HOT 2
- swift中的inputtext输入框高度自增代码 HOT 4
- 加载网络图片功能 HOT 1
- 新的方案 HOT 3
- 有纯代码的吗 HOT 2
- 底部输入工具栏不显示 HOT 2
- 如何弹出leftCell当调用[self.chatModel populateRandomDataSource]; Rúhé dànchū leftCell dāng diàoyòng [self.ChatModel populateRandomDataSource];
- 请问如何只把输入框抽取出来 HOT 4
- 两个输入框实例的报错问题。 HOT 1
- 如果聊天有背景,当输入的时候,背景会被压缩变形 HOT 1
- 感谢博主的无私奉献 ! HOT 2
- AFNetWork 3.0差异性问题 HOT 2
- 请问,为什么从服务器返回图片的时候会崩溃 HOT 6
- 发送接收数据 HOT 5
- VoiceLib找到了么? HOT 2
- 模拟器不能运行 报错 HOT 1
- 录音有杂音? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uuchattableview.