发送文本处理ui和逻辑
This commit is contained in:
@@ -46,6 +46,9 @@ typedef NS_ENUM(NSInteger, KBVoiceInputBarState) {
|
||||
/// 代理
|
||||
@property (nonatomic, weak) id<KBVoiceInputBarDelegate> delegate;
|
||||
|
||||
/// 文本发送回调(文本模式下发送消息时触发)
|
||||
@property (nonatomic, copy) void (^onTextSend)(NSString *text);
|
||||
|
||||
/// 状态文本(显示在按钮上方)
|
||||
@property (nonatomic, copy) NSString *statusText;
|
||||
|
||||
|
||||
@@ -408,8 +408,10 @@
|
||||
}
|
||||
|
||||
- (void)handleTextCenterTap {
|
||||
self.inputState = KBVoiceInputBarStateText;
|
||||
[self.hiddenTextField becomeFirstResponder];
|
||||
// 文本模式点击时,触发回调让 VC 显示文本输入框
|
||||
if (self.onTextSend) {
|
||||
self.onTextSend(nil);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleVoiceLongPress:(UILongPressGestureRecognizer *)gesture {
|
||||
|
||||
Reference in New Issue
Block a user