This commit is contained in:
2026-02-09 16:53:30 +08:00
parent e4223b3a4c
commit 4dfd6f5cbb
7 changed files with 32 additions and 18 deletions

View File

@@ -5,12 +5,12 @@
"scale" : "1x"
},
{
"filename" : "tab_shequ_selected@2x.png",
"filename" : "切图 145@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tab_shequ_selected@3x.png",
"filename" : "切图 145@3x.png",
"idiom" : "universal",
"scale" : "3x"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -50,6 +50,7 @@
@property (nonatomic, strong) UIView *bottomBackgroundView;
@property (nonatomic, strong) UIVisualEffectView *bottomBlurEffectView;
@property (nonatomic, strong) CAGradientLayer *bottomMaskLayer;
@property (nonatomic, strong) CAGradientLayer *bottomGradientLayer;
///
@property (nonatomic, strong) KBVoiceToTextManager *voiceToTextManager;
@@ -184,15 +185,15 @@ static NSString * const KBAISelectedPersonaIdKey = @"KBAISelectedPersonaId";
- (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews];
if (self.bottomMaskLayer) {
self.bottomMaskLayer.frame = self.bottomBlurEffectView.bounds;
if (self.bottomGradientLayer) {
self.bottomGradientLayer.frame = self.bottomBackgroundView.bounds;
}
}
#pragma mark - 1
- (void)setupUI {
self.voiceInputBarHeight = 52;
self.voiceInputBarHeight = 138;
self.baseInputBarBottomSpacing = KB_TABBAR_HEIGHT;
[self.view addSubview:self.collectionView];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -891,32 +892,38 @@ static NSString * const KBAISelectedPersonaIdKey = @"KBAISelectedPersonaId";
if (!_bottomBackgroundView) {
_bottomBackgroundView = [[UIView alloc] init];
_bottomBackgroundView.clipsToBounds = YES;
//
_bottomBackgroundView.layer.mask = self.bottomGradientLayer;
}
return _bottomBackgroundView;
}
- (UIVisualEffectView *)bottomBlurEffectView {
if (!_bottomBlurEffectView) {
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
// 使
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
_bottomBlurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
_bottomBlurEffectView.layer.mask = self.bottomMaskLayer;
_bottomBlurEffectView.alpha = 0.9; //
}
return _bottomBlurEffectView;
}
- (CAGradientLayer *)bottomMaskLayer {
if (!_bottomMaskLayer) {
_bottomMaskLayer = [CAGradientLayer layer];
_bottomMaskLayer.startPoint = CGPointMake(0.5, 1);
_bottomMaskLayer.endPoint = CGPointMake(0.5, 0);
_bottomMaskLayer.colors = @[
(__bridge id)[UIColor whiteColor].CGColor,
(__bridge id)[UIColor whiteColor].CGColor,
(__bridge id)[UIColor clearColor].CGColor
- (CAGradientLayer *)bottomGradientLayer {
if (!_bottomGradientLayer) {
_bottomGradientLayer = [CAGradientLayer layer];
//
_bottomGradientLayer.startPoint = CGPointMake(0.5, 1);
_bottomGradientLayer.endPoint = CGPointMake(0.5, 0);
//
//
_bottomGradientLayer.colors = @[
(__bridge id)[UIColor whiteColor].CGColor, //
(__bridge id)[UIColor whiteColor].CGColor, //
(__bridge id)[[UIColor whiteColor] colorWithAlphaComponent:0.0].CGColor //
];
_bottomMaskLayer.locations = @[@(0.0), @(0.5), @(1.0)];
_bottomGradientLayer.locations = @[@(0.0), @(0.4), @(1.0)];
}
return _bottomMaskLayer;
return _bottomGradientLayer;
}
- (UIButton *)messageButton {

View File

@@ -124,6 +124,13 @@
for (NSInteger i = 0; i < self.buttons.count; i++) {
UIButton *button = self.buttons[i];
button.selected = (i == self.selectedIndex);
// 2
if (i == 2 && button.selected) {
[button setTitleColor:[UIColor whiteColor] forState:UIControlStateSelected];
} else if (i == 2) {
[button setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
}
}
}