2
This commit is contained in:
@@ -46,7 +46,8 @@
|
||||
self.title = KBLocalized(@"lang_test_title");
|
||||
NSString *code = [KBLocalizationManager shared].currentLanguageCode ?: @"";
|
||||
NSString *fmt = KBLocalized(@"current_lang");
|
||||
self.label.text = [NSString stringWithFormat:fmt.length ? fmt : @"当前:%@", code];
|
||||
NSString *fallback = KBLocalized(@"当前:%@");
|
||||
self.label.text = [NSString stringWithFormat:fmt.length ? fmt : fallback, code];
|
||||
[self.toggleBtn setTitle:KBLocalized(@"lang_toggle") forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
@@ -57,4 +58,3 @@
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
_applyBtn = [UIButton buttonWithType:UIButtonTypeSystem];
|
||||
[_applyBtn setTitle:@"下载并应用" forState:UIControlStateNormal];
|
||||
[_applyBtn setTitle:KBLocalized(@"Download & Apply") forState:UIControlStateNormal];
|
||||
_applyBtn.layer.cornerRadius = 6; _applyBtn.layer.borderWidth = 1;
|
||||
_applyBtn.layer.borderColor = [UIColor colorWithWhite:0.85 alpha:1].CGColor;
|
||||
[self.contentView addSubview:_applyBtn];
|
||||
@@ -41,14 +41,14 @@
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.title = @"皮肤中心";
|
||||
self.title = KBLocalized(@"皮肤中心");
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
// 绝对 URL 的测试皮肤图片(无需 KB_BASE_URL)。
|
||||
// 说明:使用 picsum.photos 的固定 id,稳定可直接访问。
|
||||
self.skins = @[
|
||||
@{ @"id": @"aurora", @"name": @"极光", @"img": @"https://picsum.photos/id/1018/1600/900.jpg" },
|
||||
@{ @"id": @"alps", @"name": @"雪山", @"img": @"https://picsum.photos/id/1016/1600/900.jpg" },
|
||||
@{ @"id": @"lake", @"name": @"湖面", @"img": @"https://picsum.photos/id/1039/1600/900.jpg" },
|
||||
@{ @"id": @"aurora", @"name": KBLocalized(@"极光"), @"img": @"https://picsum.photos/id/1018/1600/900.jpg" },
|
||||
@{ @"id": @"alps", @"name": KBLocalized(@"雪山"), @"img": @"https://picsum.photos/id/1016/1600/900.jpg" },
|
||||
@{ @"id": @"lake", @"name": KBLocalized(@"湖面"), @"img": @"https://picsum.photos/id/1039/1600/900.jpg" },
|
||||
];
|
||||
|
||||
self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleInsetGrouped];
|
||||
@@ -124,7 +124,7 @@
|
||||
payload = UIImageJPEGRepresentation(img, 0.9);
|
||||
}
|
||||
BOOL ok = (payload.length > 0) ? [[KBSkinManager shared] applyImageSkinWithData:payload skinId:skin[@"id"] name:skin[@"name"]] : NO;
|
||||
[KBHUD showInfo:(ok ? @"已应用,切到键盘查看" : @"应用失败")];
|
||||
[KBHUD showInfo:(ok ? KBLocalized(@"已应用,切到键盘查看") : KBLocalized(@"应用失败"))];
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
self.tableView.tableHeaderView = header;
|
||||
[self.view addSubview:self.tableView];
|
||||
|
||||
self.items = @[ KBLocalized(@"home_item_lang_test"), KBLocalized(@"home_item_keyboard_permission"), @"皮肤中心" ];
|
||||
self.items = @[ KBLocalized(@"home_item_lang_test"), KBLocalized(@"home_item_keyboard_permission"), KBLocalized(@"皮肤中心") ];
|
||||
|
||||
dispatch_async(dispatch_get_main_queue(), ^{ [self.textView becomeFirstResponder]; });
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
- (void)viewWillAppear:(BOOL)animated{
|
||||
[super viewWillAppear:animated];
|
||||
self.title = KBLocalized(@"home_title");
|
||||
self.items = @[ KBLocalized(@"home_item_lang_test"), KBLocalized(@"home_item_keyboard_permission"), @"皮肤中心" ];
|
||||
self.items = @[ KBLocalized(@"home_item_lang_test"), KBLocalized(@"home_item_keyboard_permission"), KBLocalized(@"皮肤中心") ];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user