File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 22
33本文以红包消息为例介绍如何添加一种新类型的自定义消息 Cell。
44
5- ## 继承自定义消息 Cell
5+ ## 步骤一 继承自定义消息 Cell
66
77根据需求继承 ` EaseChatUIKit ` 中的自定义消息 Cell。
88
@@ -33,7 +33,7 @@ class RedPackageCell: CustomMessageCell {
3333
3434```
3535
36- ## 继承 Cell 的渲染模型
36+ ## 步骤二 继承 Cell 的渲染模型
3737
3838根据需求继承 ` EaseChatUIKit ` 中的 Cell 的渲染模型 ` MessageEntity ` ,并指定气泡大小,其中 ` redPackageIdentifier ` 为红包的自定义消息的 ` event ` 事件。
3939
@@ -68,7 +68,7 @@ final class MineMessageEntity: MessageEntity {
6868}
6969```
7070
71- ## 添加附件消息类型
71+ ## 步骤三 添加附件消息类型
7272
7373添加附件消息的类型,例如,增加红包消息。
7474
@@ -78,7 +78,7 @@ final class MineMessageEntity: MessageEntity {
7878 Appearance.chat .inputExtendActions .append (redPackage)
7979```
8080
81- ## 处理新增的附件消息类型的点击事件
81+ ## 步骤四 处理新增的附件消息类型的点击事件
8282
8383继承 ` MessageListController ` ,处理新增的附件消息类型的点击事件。
8484
@@ -109,7 +109,7 @@ let redPackageIdentifier = "redPackage"
109109
110110![ img] (/images/uikit/chatuikit/ios/configurationitem/chat/red_package_attachment.png =350x750)
111111
112- ## 增加发送新类型附件消息的方法
112+ ## 步骤五 增加发送新类型附件消息的方法
113113
114114在 ` EaseChatUIKit ` 的 ` MessageListViewModel ` 中增加发送红包消息的方法。
115115
@@ -145,7 +145,7 @@ extension MessageListViewModel {
145145
146146![ img] (/images/uikit/chatuikit/ios/configurationitem/chat/red_package_send.png =350x750)
147147
148- ## 注册继承的对象
148+ ## 步骤六 注册继承的对象
149149
150150将上述继承的对象初始化后,在 ` EaseChatUIKit ` 中进行注册。
151151
You can’t perform that action at this time.
0 commit comments