This commit is contained in:
2026-01-27 16:28:17 +08:00
parent ce889e1ed0
commit 2b749cd2b0
26 changed files with 1092 additions and 128 deletions

View File

@@ -27,6 +27,18 @@ NS_ASSUME_NONNULL_BEGIN
@end
typedef NS_ENUM(NSInteger, KBVoiceInputBarMode) {
KBVoiceInputBarModeText,
KBVoiceInputBarModeVoice
};
typedef NS_ENUM(NSInteger, KBVoiceInputBarState) {
KBVoiceInputBarStateText,
KBVoiceInputBarStateVoice,
KBVoiceInputBarStateRecording,
KBVoiceInputBarStateCancel
};
/// 底部语音输入栏
/// 包含:毛玻璃背景 + 录音按钮
@interface KBVoiceInputBar : UIView
@@ -37,6 +49,12 @@ NS_ASSUME_NONNULL_BEGIN
/// 状态文本(显示在按钮上方)
@property (nonatomic, copy) NSString *statusText;
/// 输入模式(文字/语音)
@property (nonatomic, assign) KBVoiceInputBarMode inputMode;
/// 输入状态(文字/语音/录音/取消)
@property (nonatomic, assign) KBVoiceInputBarState inputState;
/// 是否启用(禁用时按钮不可点击)
@property (nonatomic, assign) BOOL enabled;