有两个方案

方案1 直接替换气泡图片:可以从我们的资源包中找到气泡图片,然后替换成您自己的图片即可。

方案2 修改 SDK 代码:请参考如下代码:

会话界面调用该方法:

/*! 即将显示消息Cell的回调

@param cell        消息Cell @param indexPath   该Cell对应的消息Cell数据模型在数据源中的索引值

@discussion 您可以在此回调中修改Cell的显示和某些属性。 */

  • -(void)willDisplayMessageCell:(RCMessageBaseCell *)cell atIndexPath:(NSIndexPath *)indexPath { if ([cell isMemberOfClass:[RCTextMessageCell class]]) { RCTextMessageCell *textCell=(RCTextMessageCell *)cell; //      自定义气泡图片的适配 UIImage *image=textCell.bubbleBackgroundView.image; textCell.bubbleBackgroundView.image=[textCell.bubbleBackgroundView.image resizableImageWithCapInsets:UIEdgeInsetsMake(image.size.height * 0.8, image.size.width * 0.8,image.size.height * 0.2, image.size.width * 0.2)]; //      更改字体的颜色 textCell.textLabel.textColor=[UIColor redColor]; } } 另外 IMKit SDK 已经开源,建议您集成源码进行调试,源码集成见: 融云开发者文档