2
This commit is contained in:
@@ -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(@"应用失败"))];
|
||||
});
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user