Files
xj-ios/im修改记录.md
T
jiayangyangandClaude Opus 4.7 8a8a914a8c feat(sos): 应急就医群视频通话加号邀请及健康档案详情页接口对接
- 多人视频页面恢复右上角加号按钮,接入自有半屏群成员面板
- 选人后自动发起视频通话邀请并即时显示受邀成员
- IM 登录同步 setSelfInfo,解决通话成员显示 ID 问题
- 健康档案详情页接入一人一案接口,移除硬编码数据
- 新增 Pods 修改记录文档

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-20 17:56:10 +08:00

87 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# IMTUICallKitPods 修改记录
> pod update 后需按本文档重新应用修改。共 2 个文件。
---
## 1. TUICallingViewManager.h
**路径:** `Pods/TUICallKit/TUICallKit/TUICallKit/UI/TUICallingViewManager.h`
**改动:**`@interface` 前加代理协议 + 声明 delegate 属性
```objc
// 在 @class CallingUserModel; 和 @interface 之间插入:
@protocol TUICallingViewManagerDelegate <NSObject>
/// 点击加号按钮,返回 YES 表示已自行处理(不再弹出系统选人页)
- (BOOL)callingViewManagerDidTapAddUser:(TUICallingViewManager *)manager;
@end
// 在 @interface 内部加:
@property (nonatomic, weak) id<TUICallingViewManagerDelegate> addUserDelegate;
```
---
## 2. TUICallingViewManager.m
**路径:** `Pods/TUICallKit/TUICallKit/TUICallKit/UI/TUICallingViewManager.m`
### 改动 A:加号按钮恢复(取消注释)
**位置:** `addOtherUserBtn` 懒加载方法(约 804 行)
```objc
// 这两行取消注释:
[_addOtherUserBtn setBackgroundImage:[TUICallingCommon getBundleImageWithName:@"ic_add_user"] forState:UIControlStateNormal];
[_addOtherUserBtn addTarget:self action:@selector(addOtherUserTouchEvent:) forControlEvents:UIControlEventTouchUpInside];
```
### 改动 B:加号点击先走代理
**位置:** `addOtherUserTouchEvent:` 方法(约 565 行)
方法开头插入代理判断:
```objc
- (void)addOtherUserTouchEvent:(UIButton *)sender {
// ↓↓↓ 插入这 4 行 ↓↓↓
if ([self.addUserDelegate respondsToSelector:@selector(callingViewManagerDidTapAddUser:)]
&& [self.addUserDelegate callingViewManagerDidTapAddUser:self]) {
return;
}
// ↑↑↑ 插入结束 ↑↑↑
TUICallKitSelectGroupMeberViewController *vc = [[TUICallKitSelectGroupMeberViewController alloc] init];
// ... 原有代码不变
}
```
---
## 业务层使用方式
```objc
#import "TUICallingViewManager.h"
TUICallingViewManager *manager = [[TUICallKit createInstance] valueForKey:@"callingViewManager"];
manager.addUserDelegate = self;
// 实现代理:
- (BOOL)callingViewManagerDidTapAddUser:(TUICallingViewManager *)manager {
// 弹出自己的半屏选人 view
[self showMemberTableView];
return YES; // 返回 YES 表示已自行处理
}
```
---
## 注意事项
- 删除 `TUICallingViewManager+XJAddUser.h/.m` 两个文件(Swizzle 方案已废弃,改用代理)
- pod update 后需重新应用上述 2 个文件的改动