默认
发表评论 0
想开发IM:买成品怕坑?租第3方怕贵?找开源自已撸?尽量别走弯路了... 找站长给点建议
自定义聊天界面头像
阅读(13739) | 评论(0 收藏 淘帖
"在聊天界面(继承RCConversationViewController的ViewController)里,实现下面的方法

- (void)willDisplayConversationTableCellRCMessageBaseCell *)cell atIndexPathNSIndexPath *)indexPath
{
    if ([cell isKindOfClass:[RCMessageCell class]]) {
        RCMessageCell *messageCell = (RCMessageCell *)cell;
        //messageCell.portraitImageView
        UIImageView *portraitImageView= (UIImageView *)messageCell.portraitImageView;
        portraitImageView.layer.cornerRadius = 10;
    }
}
在方法里判断如果 cell 是 RCMessageCell,就将 cell 强制转换成 RCMessageCell,然后找到 cell 的 portraitImageView 属性,再强制转换为UIImageView,这样就可以设置圆角的半径了。(来源参考:https://www.rongcloud.cn/?utm_source=SEO)"


即时通讯网 - 即时通讯开发者社区! 来源: - 即时通讯开发者社区!

上一篇:配置和使用自定义多语言推送模板下一篇:什么是日分发消息总量?
推荐方案
打赏楼主 ×
使用微信打赏! 使用支付宝打赏!

返回顶部