This commit is contained in:
2025-12-11 19:43:55 +08:00
parent cccced6afa
commit 577b749198
12 changed files with 244 additions and 80 deletions

View File

@@ -45,12 +45,12 @@
NSString *downloadText = [NSString stringWithFormat:@"%@: %@", KBLocalized(@"Download"), download];
self.leftLabel.text = title;
self.rightLabel.text = downloadText;
UIImage *placeholder = [UIImage imageNamed:@"shop_headbigBg_icon"];
if (detail.themePreviewImageUrl.length) {
[self.coverView kb_setImageURL:detail.themePreviewImageUrl placeholder:placeholder];
} else {
self.coverView.image = placeholder;
}
// UIImage *placeholder = [UIImage imageNamed:@"shop_headbigBg_icon"];
// if (detail.themePreviewImageUrl.length) {
[self.coverView kb_setImageURL:detail.themePreviewImageUrl placeholder:KBPlaceholderImage];
// } else {
// self.coverView.image = placeholder;
// }
}
#pragma mark - Lazy

View File

@@ -13,8 +13,8 @@ NS_ASSUME_NONNULL_BEGIN
/// 是否处于编辑态(显示左上角选择圆点)
@property (nonatomic, assign, getter=isEditing) BOOL editing;
/// 配置显示内容(演示仅传标题与占位图)
- (void)configWithTitle:(NSString *)title image:(nullable UIImage *)image;
/// 配置显示内容(标题 + 远程预览图)
- (void)configWithTitle:(NSString *)title imageURL:(nullable NSString *)imageURL;
/// 根据选中状态刷新打勾样式(供外部在 select/deselect 时调用)
- (void)updateSelected:(BOOL)selected;
@@ -22,4 +22,3 @@ NS_ASSUME_NONNULL_BEGIN
@end
NS_ASSUME_NONNULL_END

View File

@@ -6,6 +6,7 @@
#import "MySkinCell.h"
#import <Masonry/Masonry.h>
#import "UIColor+Extension.h"
#import "UIImageView+KBWebImage.h"
// + CAShapeLayer
@interface KBSelectDotView : UIView
@@ -122,10 +123,11 @@
[self updateSelected:selected];
}
- (void)configWithTitle:(NSString *)title image:(UIImage *)image {
- (void)configWithTitle:(NSString *)title imageURL:(NSString *)imageURL {
self.titleLabel.text = title.length ? title : @"Dopamine";
//
self.coverView.backgroundColor = [UIColor colorWithWhite:0.92 alpha:1.0];
UIImage *placeholder = [UIImage imageNamed:@"my_skin_placeholder"];
[self.coverView kb_setImageURL:imageURL placeholder:placeholder];
}
- (void)setEditing:(BOOL)editing {