黑客24小时接单的平台

黑客服务,黑客业务,破解密码,网站入侵,入侵网站

ios融云单聊清除聊天记录的简单介绍

本文目录一览:

ios 融云即时通讯云为什么头像和名称没有

你点击下左下角--菜单--好友与资料---更新好友 看看能不能成功,我有时候出现这个情况就这么搞定,能成功请加分! 不能成功,那就下个新的版本的QQ im去下载新版本

ios融云怎么获取聊天列表数组

float[,] p=new float[]{}; p.getlength(0); p.getlength(1); 0代表的行数,1代表的列数,即,一维和二维

ios融云开发 怎么去掉消息数

你是要怎么个删除法。是要实现滑动cell出现删除按钮,然后点击删除? 还是什么。。

//按钮显示的内容

- (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath {

return @"删除";

}

//这里就是点击删除执行的方法

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {

}

1.如果你的数据是从服务器获取的,那就直接调用接口,重新获取数据源 再

[tableView reloadData]; 就行

2.如果只想修改本地数据

[_data removeObjectAtIndex:[indexPath row]]; //删除_data数组里的数据

[tableview deleteRowsAtIndexPaths:[NSMutableArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; //删除对应数据的cell

ios 融云当用户变更时怎么清空好友会话列表

我开始做了一个APP,聊天界面,上面是几个固定的,类似于新浪微博的消息界面,上面是固定的,下面是会话列表

1.自己写一个会话列表继承RCConversationListViewController;

2,设置会话类型;(这里我就不详细说了,融云教学视频很详细,下面才是最重要的,自定义会话列表)

3.出入自己的数据源数据,父类里面有个设置数据源的方法;记住一定要设置conversationModelType的类型为:RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION(用户自定义的会话显示),然后我设置置顶显示 model.isTop = YES;

[objc] view plain copy

//插入自定义会话model

- (NSMutableArray *)willReloadTableData:(NSMutableArray *)dataSource{

if ([PersonInfo.type isEqualToString:@"STUDY"]) {

_titleArr = @[@"系统通知",@"评论",@"点赞"];

}else if ([PersonInfo.type isEqualToString:@"TEACHER"]){

_titleArr = @[@"系统通知",@"评论",@"点赞",@"访客"];

}

for (int i = 0; i_titleArr.count; i++) {

RCConversationModel *model = [[RCConversationModel alloc]init];

model.conversationModelType = RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION;

model.conversationTitle = _titleArr[i];

model.isTop = YES;

[dataSource insertObject:model atIndex:i];

}

return dataSource;

}

4.设置cell的高度

[objc] view plain copy

#pragma mark - 设置cell的高度

- (CGFloat)rcConversationListTableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{

return 70;

}

5.关闭cell的左滑删除事件;因为头部几个点击是跳转新的控制器,是固定的,不能删除;

[objc] view plain copy

#pragma mark - 设置cell的删除事件

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath{

RCConversationModel *model = [self.conversationListDataSource objectAtIndex:indexPath.row];

if(model.conversationModelType == RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION){

return UITableViewCellEditingStyleNone;

}else{

return UITableViewCellEditingStyleDelete;

}

}

6.修改cell上面字体的字体样式;RCConversationBaseCell里面没有title和content label等控件,所以需要转化一下;转成RCConversationCell;我用的是平方字体;

[objc] view plain copy

#pragma mark - 修改cell样式

- (void)willDisplayConversationTableCell:(RCConversationBaseCell *)cell atIndexPath:(NSIndexPath *)indexPath{

RCConversationModel *model = [self.conversationListDataSource objectAtIndex:indexPath.row];

if(model.conversationModelType != RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION){

RCConversationCell *RCcell = (RCConversationCell *)cell;

RCcell.conversationTitle.font = [UIFont fontWithName:@"PingFangSC-Light" size:18];

RCcell.messageContentLabel.font = [UIFont fontWithName:@"PingFangSC-Light" size:16];

RCcell.messageCreatedTimeLabel.font = [UIFont fontWithName:@"PingFangSC-Light" size:14];

}

}

7.自定义cell,注意自定义的cell一定要继承于RCConversationBaseCell

[objc] view plain copy

#pragma mark - 自定义cell

- (RCConversationBaseCell *)rcConversationListTableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{

RongYunListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"RongYunListCell"];

if (!cell) {

cell = [[[NSBundle mainBundle]loadNibNamed:@"RongYunListCell" owner:self options:nil] firstObject];

cell.selectionStyle = UITableViewCellSelectionStyleNone;

cell.ListOneCount.hidden = YES;

}

NSInteger count = 0;

if(indexPath.row _badgeValueArr.count){

count = [_badgeValueArr[indexPath.row] integerValue];

}

if(count0){

cell.ListOneCount.hidden = NO;

cell.ListOneCount.text = [NSString stringWithFormat:@"%ld",count];

}else{

cell.ListOneCount.hidden = YES;

}

RCConversationModel *model = self.conversationListDataSource[indexPath.row];

[cell setRongYunListCellOneUIViewWithModel:model iconName:_iconArr[indexPath.row]];

return cell;

}

8.cell的选中事件

[objc] view plain copy

#pragma mark - cell选中事件

- (void)onSelectedTableRow:(RCConversationModelType)conversationModelType conversationModel:(RCConversationModel *)model atIndexPath:(NSIndexPath *)indexPath{

[self.conversationListTableView deselectRowAtIndexPath:indexPath animated:YES];

if(model.conversationModelType == RC_CONVERSATION_MODEL_TYPE_CUSTOMIZATION){

NSString *cellTitle = model.conversationTitle;

if([cellTitle isEqualToString:@"系统通知"]){

//系统消息

NewsSystemSecondViewController *svc = [[NewsSystemSecondViewController alloc]init];

svc.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:svc animated:YES];

}else if ([cellTitle isEqualToString:@"评论"]){

//评论

SystemCommentViewController *svc = [[SystemCommentViewController alloc]init];

svc.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:svc animated:YES];

}else if ([cellTitle isEqualToString:@"点赞"]){

//点赞

ClickLinckedViewController *svc = [[ClickLinckedViewController alloc]init];

svc.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:svc animated:YES];

}else if ([cellTitle isEqualToString:@"访客"]){

//访客

MyVistorsViewController *svc = [[MyVistorsViewController alloc]init];

svc.hidesBottomBarWhenPushed = YES;

[self.navigationController pushViewController:svc animated:YES];

}

}else{

//会话列表

RCConversationViewController *conversationVC = [[RCConversationViewController alloc]init];

conversationVC.hidesBottomBarWhenPushed = YES;

conversationVC.conversationType = model.conversationType;

conversationVC.targetId = model.targetId;

conversationVC.title = [self getUserNameWithUserID:model.targetId];

[self.navigationController pushViewController:conversationVC animated:YES];

}

}

  • 评论列表:
  •  听弧等灯
     发布于 2022-07-14 04:51:19  回复该评论
  • 候出现这个情况就这么搞定,能成功请加分! 不能成功,那就下个新的版本的QQ im去下载新版本ios融云怎么获取聊天列表数组float[,] p=new float[]{};p.getlength(0);p.getlength(1);0代表的行数,1代表的列数,即,一维和二维ios融云开发

发表评论:

Powered By

Copyright Your WebSite.Some Rights Reserved.