Skip to content

Commit dd12537

Browse files
authored
Merge pull request #1115 from haoxiuwen/doc-v2
Add Chat UIKit iOS 4.11.2
2 parents 86a7ac2 + f8c2bbf commit dd12537

File tree

2 files changed

+11
-36
lines changed

2 files changed

+11
-36
lines changed

docs/uikit/chatuikit/ios/chatuikit_custom_cell.md

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -84,40 +84,7 @@ final class MineMessageEntity: MessageEntity {
8484

8585
```swift
8686
class CustomMessageListController: MessageListController {
87-
88-
//要实现微信样式(followInput),需要同时重载下面的方法以及仿系统 UIActionSheet 样式(ActionSheet)的方法
89-
override func processFollowInputAttachmentAction() {
90-
if Appearance.chat.messageAttachmentMenuStyle == .followInput {
91-
if let fileItem = Appearance.chat.inputExtendActions.first(where: { $0.tag == "File" }) {
92-
fileItem.action = { [weak self] item,object in
93-
self?.handleAttachmentAction(item: item)
94-
}
95-
}
96-
if let photoItem = Appearance.chat.inputExtendActions.first(where: { $0.tag == "Photo" }) {
97-
photoItem.action = { [weak self] item,object in
98-
self?.handleAttachmentAction(item: item)
99-
}
100-
}
101-
if let cameraItem = Appearance.chat.inputExtendActions.first(where: { $0.tag == "Camera" }) {
102-
cameraItem.action = { [weak self] item,object in
103-
self?.handleAttachmentAction(item: item)
104-
}
105-
}
106-
if let contactItem = Appearance.chat.inputExtendActions.first(where: { $0.tag == "Contact" }) {
107-
contactItem.action = { [weak self] item,object in
108-
self?.handleAttachmentAction(item: item)
109-
}
110-
}
111-
if let redPackageItem = Appearance.chat.inputExtendActions.first(where: { $0.tag == "Red" }) {
112-
redPackageItem.action = { [weak self] item,object in
113-
self?.handleAttachmentAction(item: item)
114-
}
115-
}
116-
117-
}
118-
}
11987

120-
//仿系统 UIActionSheet 样式(ActionSheet)只需要重载以下方法
12188
override func handleAttachmentAction(item: any ActionSheetItemProtocol) {
12289
switch item.tag {
12390
case "File": self.selectFile()
@@ -191,7 +158,8 @@ extension MessageListViewModel {
191158
ComponentsRegister.shared.MessageRenderEntity = MineMessageEntity.self
192159
ComponentsRegister.shared.Conversation = MineConversationInfo.self
193160
ComponentsRegister.shared.MessageViewController = CustomMessageListController.self
194-
ComponentsRegister.shared.registerCustomizeCellClass(cellType: RedPackageCell.self)
161+
//redPackageIdentifier 为Cell的唯一标识,也是环信自定义消息的时间类型
162+
ComponentsRegister.shared.registerCustomCellClasses(cellType: RedPackageCell.self,identifier: redPackageIdentifier)
195163
```
196164

197165
这里的 `ComponentsRegister.shared.Conversation = MineConversationInfo.self` 用于在会话列表中展示收到的新类型的自定义消息内容。

docs/uikit/chatuikit/ios/releasenote.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
# iOS 单群聊 UIKit 更新日志
22

3-
## 版本 4.11.0
3+
## 版本 4.11.2
4+
5+
### 问题修复
6+
7+
- 修复无法注册多个自定义 Cell 的问题。
8+
- 修复一些键盘交互问题。
9+
10+
## 版本 4.11.1
411

512
### 问题修复
613

7-
修复了部分 `UIKit内ChatNavigationBar` 继承后需要调用内部指定初始化器,与系统的初始化方法同名导致递归的问题。
14+
修复了部分 UIKit 内 `ChatNavigationBar` 继承后需要调用内部指定初始化器,与系统的初始化方法同名导致递归的问题。
815

916
## 版本 4.11.0
1017

0 commit comments

Comments
 (0)