新增聊天记录
This commit is contained in:
53
keyBoard/Class/AiTalk/V/KBVoiceInputBar.h
Normal file
53
keyBoard/Class/AiTalk/V/KBVoiceInputBar.h
Normal file
@@ -0,0 +1,53 @@
|
||||
//
|
||||
// KBVoiceInputBar.h
|
||||
// keyBoard
|
||||
//
|
||||
// Created by Kiro on 2026/1/26.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class KBVoiceInputBar;
|
||||
|
||||
/// 语音输入栏代理
|
||||
@protocol KBVoiceInputBarDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
||||
/// 开始录音
|
||||
- (void)voiceInputBarDidBeginRecording:(KBVoiceInputBar *)inputBar;
|
||||
|
||||
/// 结束录音
|
||||
- (void)voiceInputBarDidEndRecording:(KBVoiceInputBar *)inputBar;
|
||||
|
||||
/// 取消录音
|
||||
- (void)voiceInputBarDidCancelRecording:(KBVoiceInputBar *)inputBar;
|
||||
|
||||
@end
|
||||
|
||||
/// 底部语音输入栏
|
||||
/// 包含:毛玻璃背景 + 录音按钮
|
||||
@interface KBVoiceInputBar : UIView
|
||||
|
||||
/// 代理
|
||||
@property (nonatomic, weak) id<KBVoiceInputBarDelegate> delegate;
|
||||
|
||||
/// 状态文本(显示在按钮上方)
|
||||
@property (nonatomic, copy) NSString *statusText;
|
||||
|
||||
/// 是否启用(禁用时按钮不可点击)
|
||||
@property (nonatomic, assign) BOOL enabled;
|
||||
|
||||
/// 更新音量(用于波形动画)
|
||||
/// @param rms 音量 RMS 值 (0.0 - 1.0)
|
||||
- (void)updateVolumeRMS:(float)rms;
|
||||
|
||||
/// 设置录音状态
|
||||
/// @param recording 是否正在录音
|
||||
- (void)setRecording:(BOOL)recording;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Reference in New Issue
Block a user