2
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user