视图显示
即将显示消息 Cell¶
开发者可以在此回调中修改 Cell
的显示和某些属性。
参数 | 类型 | 说明 |
---|---|---|
cell | RCMessageBaseCell | 消息Cell |
indexPath | NSIndexPath | 该Cell对应的消息Cell数据模型在数据源中的索引值 |
- (void)willDisplayMessageCell:(RCMessageBaseCell *)cell atIndexPath:(NSIndexPath *)indexPath;
未注册消息 Cell 显示¶
未注册消息的显示主要用于 App 未雨绸缪的新旧版本兼容,比如,开发者 App 在新版本迭代中增加了某种自定义消息,当已经发布的旧版本不能识别,开发者可以在旧版本中预先定义好这些不能识别的消息的显示,如提示当前版本不支持,引导用户升级等。
在使用此回调之前,需要将 RCIM
的 showUnkownMessage
设置为 YES
。
参数 | 类型 | 说明 |
---|---|---|
collectionView | UICollectionView | 当前CollectionView |
indexPath | NSIndexPath | 该Cell对应的消息Cell数据模型在数据源中的索引值 |
返回值 | RCMessageBaseCell | 未注册消息需要显示的Cell |
- (RCMessageBaseCell *)rcUnkownConversationCollectionView:(UICollectionView *)collectionView
cellForItemAtIndexPath:(NSIndexPath *)indexPath;
参数 | 类型 | 说明 |
---|---|---|
collectionView | UICollectionView | 当前CollectionView |
collectionViewLayout | UICollectionViewLayout | 当前CollectionView Layout |
indexPath | NSIndexPath | 该Cell对应的消息Cell数据模型在数据源中的索引值 |
返回值 | CGSize | 未注册消息Cell需要显示的高度 |
- (CGSize)rcUnkownConversationCollectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout *)collectionViewLayout
sizeForItemAtIndexPath:(NSIndexPath *)indexPath;