From eaaf0e1ed628eea7ff22444798f654570d7e372c Mon Sep 17 00:00:00 2001 From: CodeST <694468528@qq.com> Date: Mon, 22 Dec 2025 13:08:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CustomKeyboard/View/KBFunctionBarView.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CustomKeyboard/View/KBFunctionBarView.m b/CustomKeyboard/View/KBFunctionBarView.m index 27ba738..655c561 100644 --- a/CustomKeyboard/View/KBFunctionBarView.m +++ b/CustomKeyboard/View/KBFunctionBarView.m @@ -18,6 +18,7 @@ @end @implementation KBFunctionBarView +static const CGFloat kKBBackButtonWidth = 40; - (instancetype)initWithFrame:(CGRect)frame{ if (self = [super initWithFrame:frame]) { @@ -83,14 +84,14 @@ UIButton *appButton = [UIButton buttonWithType:UIButtonTypeCustom]; appButton.tag = 100; // 左侧 index = 0 UIImage *appImage = [UIImage imageNamed:@"App_icon"]; - [appButton setImage:appImage forState:UIControlStateNormal]; + [appButton setBackgroundImage:appImage forState:UIControlStateNormal]; appButton.imageView.contentMode = UIViewContentModeScaleAspectFit; appButton.adjustsImageWhenHighlighted = YES; [appButton addTarget:self action:@selector(onLeftTap:) forControlEvents:UIControlEventTouchUpInside]; [self.leftContainer addSubview:appButton]; [appButton mas_makeConstraints:^(MASConstraintMaker *make) { make.center.equalTo(self.leftContainer); - make.width.height.mas_equalTo(34); // 设计图尺寸 + make.width.height.mas_equalTo(kKBBackButtonWidth); // 设计图尺寸 }]; self.leftButtonsInternal = @[appButton];