
IM即时通讯
安全可靠、全球互通

实时音视频
流畅稳定、省钱省力
回答:
在聊天界面(继承RCConversationViewController的ViewController)里,实现下面的方法
- (void)willDisplayConversationTableCell:(RCMessageBaseCell *)cell atIndexPath:(NSIndexPath *)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,这样就可以设置圆角的半径了。
5.x 开始 IMKit 开源,建议集成 IMKit 源码,参考对应的实现:https://doc.rongcloud.cn/im/IOS/5.X/ui/import#source