diff --git a/docs/uikit/chatuikit/ios/chatuikit_custom_cell.md b/docs/uikit/chatuikit/ios/chatuikit_custom_cell.md index 5ae82619..10e63b4a 100644 --- a/docs/uikit/chatuikit/ios/chatuikit_custom_cell.md +++ b/docs/uikit/chatuikit/ios/chatuikit_custom_cell.md @@ -84,7 +84,40 @@ final class MineMessageEntity: MessageEntity { ```Swift class CustomMessageListController: MessageListController { + + //followInput需要同时重载这个以及下面那个 + override func processFollowInputAttachmentAction() { + if Appearance.chat.messageAttachmentMenuStyle == .followInput { + if let fileItem = Appearance.chat.inputExtendActions.first(where: { $0.tag == "File" }) { + fileItem.action = { [weak self] item,object in + self?.handleAttachmentAction(item: item) + } + } + if let photoItem = Appearance.chat.inputExtendActions.first(where: { $0.tag == "Photo" }) { + photoItem.action = { [weak self] item,object in + self?.handleAttachmentAction(item: item) + } + } + if let cameraItem = Appearance.chat.inputExtendActions.first(where: { $0.tag == "Camera" }) { + cameraItem.action = { [weak self] item,object in + self?.handleAttachmentAction(item: item) + } + } + if let contactItem = Appearance.chat.inputExtendActions.first(where: { $0.tag == "Contact" }) { + contactItem.action = { [weak self] item,object in + self?.handleAttachmentAction(item: item) + } + } + if let redPackageItem = Appearance.chat.inputExtendActions.first(where: { $0.tag == "Red" }) { + redPackageItem.action = { [weak self] item,object in + self?.handleAttachmentAction(item: item) + } + } + + } + } + //ActionSheet 风格只需要重载这个 override func handleAttachmentAction(item: any ActionSheetItemProtocol) { switch item.tag { case "File": self.selectFile()