This commit is contained in:
2025-11-17 20:07:39 +08:00
parent ee433db4ad
commit 005e3c7581
43 changed files with 529 additions and 172 deletions

View File

@@ -120,7 +120,7 @@
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [UILabel new];
_titleLabel.text = @"Change The Nickname";
_titleLabel.text = KBLocalized(@"Change The Nickname");
_titleLabel.textColor = [UIColor blackColor];
_titleLabel.font = [UIFont systemFontOfSize:22 weight:UIFontWeightBold];
}
@@ -141,7 +141,7 @@
[_closeButton setTitleColor:[UIColor colorWithWhite:0.3 alpha:1] forState:UIControlStateNormal];
_closeButton.tintColor = [UIColor colorWithWhite:0.3 alpha:1];
[_closeButton addTarget:self action:@selector(onTapClose) forControlEvents:UIControlEventTouchUpInside];
_closeButton.accessibilityLabel = @"关闭";
_closeButton.accessibilityLabel = KBLocalized(@"Close");
}
return _closeButton;
}
@@ -161,7 +161,7 @@
_textField.clearButtonMode = UITextFieldViewModeWhileEditing;
_textField.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
_textField.textColor = [UIColor blackColor];
_textField.placeholder = @"Please Enter The Modified Nickname";
_textField.placeholder = KBLocalized(@"Please Enter The Modified Nickname");
}
return _textField;
}
@@ -169,7 +169,7 @@
- (UIButton *)saveButton {
if (!_saveButton) {
_saveButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_saveButton setTitle:@"Save" forState:UIControlStateNormal];
[_saveButton setTitle:KBLocalized(@"Save") forState:UIControlStateNormal];
[_saveButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
_saveButton.titleLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightSemibold];
_saveButton.backgroundColor = [UIColor colorWithRed:0.02 green:0.75 blue:0.67 alpha:1.0];
@@ -180,4 +180,3 @@
}
@end

View File

@@ -160,7 +160,7 @@
_minusTapArea = [[UIControl alloc] init];
_minusTapArea.backgroundColor = [UIColor clearColor];
// 使
_minusTapArea.accessibilityLabel = @"删除";
_minusTapArea.accessibilityLabel = KBLocalized(@"Delete");
}
return _minusTapArea;
}

View File

@@ -91,7 +91,7 @@
}];
[self.coverView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.left.right.equalTo(self.cardView);
make.height.equalTo(self.cardView.mas_width).multipliedBy(0.66); //
make.height.mas_equalTo(KBFit(126));
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.equalTo(self.cardView).offset(12);

View File

@@ -163,23 +163,10 @@ static NSString * const kKBMyKeyboardCellId = @"kKBMyKeyboardCellId";
if (!self) { return; }
NSIndexPath *tapIndexPath = [weakCV indexPathForCell:tappedCell];
if (!tapIndexPath) { return; }
// [KBAlert confirmTitle:@"删除该标签?" message:@"删除后不可恢复" completion:^(BOOL ok) {
// if (!ok) { return; }
// // item
// if (tapIndexPath.section < self.dataSourceArray.count) {
// NSMutableArray *section = self.dataSourceArray[tapIndexPath.section];
// if (tapIndexPath.item < section.count) {
// [section removeObjectAtIndex:tapIndexPath.item];
// [self.collectionView performBatchUpdates:^{
// [self.collectionView deleteItemsAtIndexPaths:@[tapIndexPath]];
// } completion:nil];
// }
// }
// }];
[KBAlert confirmTitle:@"删除该标签?"
message:@"删除后不可恢复"
ok:@"确定"
cancel:@"取消"
[KBAlert confirmTitle:KBLocalized(@"Delete this tag?")
message:KBLocalized(@"This action cannot be undone")
ok:KBLocalized(@"Confirm")
cancel:KBLocalized(@"Cancel")
okColor:[UIColor redColor]
cancelColor:[UIColor blackColor]
completion:^(BOOL ok) {
@@ -229,7 +216,7 @@ static NSString * const kKBMyKeyboardCellId = @"kKBMyKeyboardCellId";
- (void)onSave {
//
NSLog(@"保存顺序: %@", self.dataSourceArray);
[KBHUD showInfo:@"已保存"];
[KBHUD showInfo:KBLocalized(@"Saved")];
}
#pragma mark - Lazy UI

View File

@@ -176,7 +176,7 @@
NSString *userID = self.items[2][@"value"];
if (userID.length == 0) return;
UIPasteboard.generalPasteboard.string = userID;
[KBHUD showInfo:@"复制成功"];
[KBHUD showInfo:KBLocalized(@"Copy Success")];
}
}

View File

@@ -55,11 +55,8 @@ typedef NS_ENUM(NSInteger, KBSkinDetailSection) {
make.left.equalTo(self.view).offset(15);
make.right.equalTo(self.view).offset(-15);
make.height.mas_equalTo([KBSkinBottomActionView preferredHeight]);
if (@available(iOS 11.0, *)) {
make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
} else {
make.bottom.equalTo(self.view);
}
make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom).offset(-10);
}];
// 10

View File

@@ -61,9 +61,9 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
// LYEmptyView +
KBWeakSelf
[self.collectionView kb_makeDefaultEmptyViewWithImage:nil
title:@"暂无皮肤"
detail:@"下拉刷新试试"
buttonTitle:@"重试"
title:KBLocalized(@"No skins yet")
detail:KBLocalized(@"Pull down to refresh")
buttonTitle:KBLocalized(@"Retry")
tapHandler:nil
buttonHandler:^{ [weakSelf.collectionView.mj_header beginRefreshing]; }];
[self.collectionView kb_setLYAutoShowEnabled:NO]; //
@@ -224,7 +224,7 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
CGFloat spacing = 12;
CGFloat W = UIScreen.mainScreen.bounds.size.width;
CGFloat itemW = floor((W - inset * 2 - spacing) / 2.0);
CGFloat itemH = itemW * 0.82f; //
CGFloat itemH = KBFit(168); //
layout.itemSize = CGSizeMake(itemW, itemH);
layout.minimumInteritemSpacing = spacing;
layout.minimumLineSpacing = spacing;