This commit is contained in:
2025-12-16 20:20:57 +08:00
parent 59297eac77
commit b43567748c
5 changed files with 38 additions and 6 deletions

View File

@@ -56,9 +56,10 @@
topBar.backgroundColor = [UIColor clearColor];
[self addSubview:topBar];
self.backButton = [UIButton buttonWithType:UIButtonTypeSystem];
self.backButton.titleLabel.font = [UIFont systemFontOfSize:30 weight:UIFontWeightSemibold];
[self.backButton setTitle:@"⌨︎" forState:UIControlStateNormal];
self.backButton = [UIButton buttonWithType:UIButtonTypeCustom];
// self.backButton.titleLabel.font = [UIFont systemFontOfSize:30 weight:UIFontWeightSemibold];
// [self.backButton setTitle:@"⌨︎" forState:UIControlStateNormal];
[self.backButton setImage:[UIImage imageNamed:@"back_keybord_icon"] forState:UIControlStateNormal];
[self.backButton addTarget:self action:@selector(onBack) forControlEvents:UIControlEventTouchUpInside];
[topBar addSubview:self.backButton];
@@ -78,9 +79,9 @@
make.width.height.mas_equalTo(32);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.backButton.mas_right).offset(12);
make.centerX.equalTo(self);
make.centerY.equalTo(topBar);
make.right.lessThanOrEqualTo(topBar.mas_right).offset(-12);
// make.right.lessThanOrEqualTo(topBar.mas_right).offset(-12);
}];
UICollectionViewFlowLayout *layout = [UICollectionViewFlowLayout new];