1
This commit is contained in:
@@ -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