2020-03-05 腾讯IM iOS集成踩坑记录

  1. 视频消息播放页面点击左上角❌关闭按钮会把整个 navigationController 给 dismiss,修改 Pods/ 以下代码来避免这种情况。PS:后期fork一下源码将修改放到github上,目前只是临时方案,cocoapods清理缓存后执行 pod install 会把本次修改覆盖掉,发版时需要注意!
//
//  TUIMessageController.m
//  UIKit
//
//  Created by annidyfeng on 2019/7/1.
//  Copyright © 2018年 Tencent. All rights reserved.
//

- (void)showVideoMessage:(TUIVideoMessageCell *)cell {
    TUIVideoViewController *video = [[TUIVideoViewController alloc] init];
    video.data = [cell videoData];
    video.modalPresentationStyle = UIModalPresentationFullScreen;
    [self presentViewController:video animated:YES completion:nil];
//    [self.navigationController pushViewController:video animated:YES];
}
  1. 由于小程序&web端SDK没有提供已读回执的方法,所以要保持同步就需要隐藏已读未读标签
//
//  TUIMessageCellData.m
//  TXIMSDK_TUIKit_iOS
//
//  Created by annidyfeng on 2019/5/21.
//

- (id)initWithDirection:(TMsgDirection)direction
{
    self = [super init];
    if (self) {
        _direction = direction;
        _status = Msg_Status_Init;
        _nameFont = [UIFont systemFontOfSize:13];
        _nameColor = [UIColor grayColor];
        _showReadReceipt = NO;//新 Demo 默认显示已读回执
        
        _avatarImage = DefaultAvatarImage;
        
        if (direction == MsgDirectionIncoming) {
            _cellLayout = [TIncommingCellLayout new];
        } else {
            _cellLayout = [TOutgoingCellLayout new];
        }
        
    }
    return self;
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容