This commit is contained in:
2025-12-03 19:19:20 +08:00
parent b00283cd96
commit 716f91bdd0
8 changed files with 147 additions and 47 deletions

View File

@@ -10,13 +10,13 @@
#import "UIView+KBShadow.h"
@interface HomeRankCardCell ()
@property (nonatomic, strong) UIView *shadowView; //
@property (nonatomic, strong) UIView *cardView; //
@property (nonatomic, strong) UIView *badgeCircle; //
@property (nonatomic, strong) UIView *shadowView; //
@property (nonatomic, strong) UIImageView *cardView; //
@property (nonatomic, strong) UIView *badgeCircle; //
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *descLabel;
@property (nonatomic, strong) UILabel *peopleLabel;
@property (nonatomic, strong) UIButton *actionBtn; // /
@property (nonatomic, strong) UIButton *actionBtn; // /
@property (nonatomic, assign) BOOL added;
@end
@@ -125,6 +125,17 @@
}
}
- (void)setCharacter:(KBCharacter *)character {
_character = character;
NSString *title = character.characterName ?: @"";
NSString *people = character.download ?: @"";
NSString *desc = @"Be Neither Too Close\nNor Too Distant..."; //
BOOL added = character.added;
[self configureWithTitle:title desc:desc people:people added:added];
}
#pragma mark - Lazy UI
- (UIView *)shadowView {
@@ -135,12 +146,15 @@
return _shadowView;
}
- (UIView *)cardView {
- (UIImageView *)cardView {
if (!_cardView) {
_cardView = [UIView new];
_cardView = [[UIImageView alloc] init];
_cardView.backgroundColor = UIColor.whiteColor;
_cardView.layer.cornerRadius = 18.0;
_cardView.layer.masksToBounds = YES;
_cardView.contentMode = UIViewContentModeScaleAspectFill;
//
_cardView.image = [UIImage imageNamed:@"home_rank_card_bg"];
}
return _cardView;
}