This commit is contained in:
2025-12-22 13:08:59 +08:00
parent 9cdd024ce2
commit eaaf0e1ed6

View File

@@ -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];