1
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "KBCharacter.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 排行榜详情弹窗的自定义内容视图(给 LSTPopView 使用)
|
||||
@@ -17,11 +17,12 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 关闭按钮点击回调(底部圆形 X)
|
||||
@property (nonatomic, copy, nullable) void (^closeHandler)(void);
|
||||
|
||||
/// 配置数据
|
||||
- (void)configWithAvatar:(UIImage *_Nullable)avatar
|
||||
title:(NSString *)title
|
||||
download:(NSString *)download
|
||||
desc:(NSString *)desc;
|
||||
///// 配置数据
|
||||
//- (void)configWithAvatar:(UIImage *_Nullable)avatar
|
||||
// title:(NSString *)title
|
||||
// download:(NSString *)download
|
||||
// desc:(NSString *)desc;
|
||||
@property (nonatomic, strong) KBCharacter *character;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -43,14 +43,22 @@
|
||||
|
||||
#pragma mark - Public
|
||||
|
||||
- (void)configWithAvatar:(UIImage *)avatar
|
||||
title:(NSString *)title
|
||||
download:(NSString *)download
|
||||
desc:(NSString *)desc {
|
||||
self.avatarView.image = avatar ?: [self placeholderAvatar];
|
||||
self.titleLabel.text = title ?: @"";
|
||||
self.downloadLabel.text = download ?: @"";
|
||||
self.descLabel.text = desc ?: @"";
|
||||
//- (void)configWithAvatar:(UIImage *)avatar
|
||||
// title:(NSString *)title
|
||||
// download:(NSString *)download
|
||||
// desc:(NSString *)desc {
|
||||
// self.avatarView.image = avatar ?: [self placeholderAvatar];
|
||||
// self.titleLabel.text = title ?: @"";
|
||||
// self.downloadLabel.text = download ?: @"";
|
||||
// self.descLabel.text = desc ?: @"";
|
||||
//}
|
||||
- (void)setCharacter:(KBCharacter *)character{
|
||||
_character = character;
|
||||
|
||||
self.titleLabel.text = character.characterName ?: @"";
|
||||
self.downloadLabel.text = character.download ?: @"";
|
||||
self.descLabel.text = character.characterBackground ?: @"";
|
||||
[self.avatarView kb_setImageURL:character.avatarUrl placeholder:KBPlaceholderImage];
|
||||
}
|
||||
|
||||
#pragma mark - Build UI
|
||||
|
||||
Reference in New Issue
Block a user