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;
}

你可能感兴趣的:(2020-03-05 腾讯IM iOS集成踩坑记录)