处理键盘
This commit is contained in:
@@ -13,6 +13,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
- (void)chatPanelView:(KBChatPanelView *)view didSendText:(NSString *)text;
|
||||
- (void)chatPanelView:(KBChatPanelView *)view didTapMessage:(KBChatMessage *)message;
|
||||
- (void)chatPanelViewDidTapClose:(KBChatPanelView *)view;
|
||||
/// 点击语音播放按钮
|
||||
- (void)chatPanelView:(KBChatPanelView *)view didTapVoiceButtonForMessage:(KBChatMessage *)message;
|
||||
@end
|
||||
|
||||
@interface KBChatPanelView : UIView
|
||||
@@ -24,6 +26,24 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
//- (void)kb_setBackgroundImage:(nullable UIImage *)image;
|
||||
- (void)kb_reloadWithMessages:(NSArray<KBChatMessage *> *)messages;
|
||||
|
||||
/// 添加用户消息
|
||||
- (void)kb_addUserMessage:(NSString *)text;
|
||||
|
||||
/// 添加 loading 状态的 AI 消息
|
||||
- (void)kb_addLoadingAssistantMessage;
|
||||
|
||||
/// 移除 loading 状态的 AI 消息
|
||||
- (void)kb_removeLoadingAssistantMessage;
|
||||
|
||||
/// 添加 AI 消息(带打字机效果)
|
||||
- (void)kb_addAssistantMessage:(NSString *)text audioId:(nullable NSString *)audioId;
|
||||
|
||||
/// 更新最后一条 AI 消息的音频数据
|
||||
- (void)kb_updateLastAssistantMessageWithAudioData:(NSData *)audioData duration:(NSTimeInterval)duration;
|
||||
|
||||
/// 滚动到底部
|
||||
- (void)kb_scrollToBottom;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
Reference in New Issue
Block a user