Git Product home page Git Product logo

Comments (9)

ZhipingYang avatar ZhipingYang commented on July 18, 2024

在UUMessageFrame预计算size的时候,记得也需要转换文案计算size

https://github.com/ZhipingYang/UUChatTableView/blob/master/Class/UUMessageFrame.m#L44

from uuchattableview.

xiaobeifeng avatar xiaobeifeng commented on July 18, 2024

嗯嗯,这个是表情cell的显示问题。我在发送图片后图片上带文字这个问题还是没有得到解决。。。

from uuchattableview.

xiaobeifeng avatar xiaobeifeng commented on July 18, 2024

发送完图片之后,我一滚动列表,就会出现图片上出现其他cell上的文字的问题

from uuchattableview.

ZhipingYang avatar ZhipingYang commented on July 18, 2024

那就是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.

xiaobeifeng avatar xiaobeifeng commented on July 18, 2024

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.

ZhipingYang avatar ZhipingYang commented on July 18, 2024

这个demo主要提供一个思路,还有很多功能没有完善。。。哈哈哈,所以也没有做成 CocoaPods,问题解决了,就close吧

from uuchattableview.

xiaobeifeng avatar xiaobeifeng commented on July 18, 2024

from uuchattableview.

ZhipingYang avatar ZhipingYang commented on July 18, 2024

UILabel的text和attributeText是两个不同的属性,不显示需要需要两个都置空。最简单的做法就是在cell的prepareForReuse 方法中恢复cell的初始状态

from uuchattableview.

xiaobeifeng avatar xiaobeifeng commented on July 18, 2024

from uuchattableview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.