2
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#import "KBVipPay.h"
|
||||
#import "KBUserSessionManager.h"
|
||||
#import "LSTPopView.h"
|
||||
#import "KBAIMessageVC.h"
|
||||
#import <Masonry/Masonry.h>
|
||||
|
||||
@interface KBAIHomeVC () <UICollectionViewDelegate, UICollectionViewDataSource, KBVoiceToTextManagerDelegate, KBVoiceRecordManagerDelegate, UIGestureRecognizerDelegate, KBChatLimitPopViewDelegate>
|
||||
@@ -68,6 +69,9 @@
|
||||
/// 是否正在等待 AI 回复(用于禁止滚动)
|
||||
@property (nonatomic, assign) BOOL isWaitingForAIResponse;
|
||||
|
||||
/// 右上角消息按钮
|
||||
@property (nonatomic, strong) UIButton *messageButton;
|
||||
|
||||
@end
|
||||
|
||||
@implementation KBAIHomeVC
|
||||
@@ -113,6 +117,14 @@
|
||||
make.edges.equalTo(self.view);
|
||||
}];
|
||||
|
||||
// 右上角消息按钮
|
||||
[self.view addSubview:self.messageButton];
|
||||
[self.messageButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.view).offset(KB_STATUSBAR_HEIGHT + 10);
|
||||
make.right.equalTo(self.view).offset(-16);
|
||||
make.width.height.mas_equalTo(32);
|
||||
}];
|
||||
|
||||
// 底部毛玻璃背景
|
||||
[self.view addSubview:self.bottomBackgroundView];
|
||||
[self.bottomBackgroundView addSubview:self.bottomBlurEffectView];
|
||||
@@ -540,6 +552,22 @@
|
||||
return _bottomMaskLayer;
|
||||
}
|
||||
|
||||
- (UIButton *)messageButton {
|
||||
if (!_messageButton) {
|
||||
_messageButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_messageButton setImage:[UIImage imageNamed:@"ai_message_icon"] forState:UIControlStateNormal];
|
||||
[_messageButton addTarget:self action:@selector(messageButtonTapped) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _messageButton;
|
||||
}
|
||||
|
||||
#pragma mark - Actions
|
||||
|
||||
- (void)messageButtonTapped {
|
||||
KBAIMessageVC *vc = [[KBAIMessageVC alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - KBVoiceToTextManagerDelegate
|
||||
|
||||
- (void)voiceToTextManager:(KBVoiceToTextManager *)manager
|
||||
|
||||
Reference in New Issue
Block a user