diff --git a/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/Contents.json b/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/Contents.json index e509d9b..83f19f5 100644 --- a/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/Contents.json +++ b/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/Contents.json @@ -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" } diff --git a/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/tab_shequ_selected@2x.png b/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/tab_shequ_selected@2x.png deleted file mode 100644 index 6177181..0000000 Binary files a/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/tab_shequ_selected@2x.png and /dev/null differ diff --git a/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/tab_shequ_selected@3x.png b/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/tab_shequ_selected@3x.png deleted file mode 100644 index f0c0a08..0000000 Binary files a/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/tab_shequ_selected@3x.png and /dev/null differ diff --git a/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/切图 145@2x.png b/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/切图 145@2x.png new file mode 100644 index 0000000..80a406c Binary files /dev/null and b/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/切图 145@2x.png differ diff --git a/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/切图 145@3x.png b/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/切图 145@3x.png new file mode 100644 index 0000000..fb21944 Binary files /dev/null and b/keyBoard/Assets.xcassets/Tabbar/tab_shequ_selected.imageset/切图 145@3x.png differ diff --git a/keyBoard/Class/AiTalk/VC/KBAIHomeVC.m b/keyBoard/Class/AiTalk/VC/KBAIHomeVC.m index cfc4e55..eaf1242 100644 --- a/keyBoard/Class/AiTalk/VC/KBAIHomeVC.m +++ b/keyBoard/Class/AiTalk/VC/KBAIHomeVC.m @@ -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 { diff --git a/keyBoard/Class/Base/V/KBCustomTabBar.m b/keyBoard/Class/Base/V/KBCustomTabBar.m index 68d6dd4..1618d44 100644 --- a/keyBoard/Class/Base/V/KBCustomTabBar.m +++ b/keyBoard/Class/Base/V/KBCustomTabBar.m @@ -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]; + } } }