This commit is contained in:
2025-11-06 21:38:58 +08:00
parent 0d13192723
commit 0fa3d10284
15 changed files with 300 additions and 20 deletions

View File

@@ -7,6 +7,7 @@
@import UIKit;
#import "HomeRankCardCell.h"
#import "UIView+KBShadow.h"
@interface HomeRankCardCell ()
@property (nonatomic, strong) UIView *shadowView; //
@@ -39,6 +40,9 @@
[self.cardView addSubview:self.descLabel];
[self.cardView addSubview:self.peopleLabel];
[self.cardView addSubview:self.actionBtn];
// 8pt
[self.shadowView kb_setCardShadowWithCornerRadius:18.0 insets:UIEdgeInsetsMake(0, 8, 0, 8)];
}
- (void)setupConstraints {
@@ -86,13 +90,8 @@
- (void)layoutSubviews {
[super layoutSubviews];
//
_shadowView.layer.shadowColor = [UIColor colorWithWhite:0 alpha:0.15].CGColor;
_shadowView.layer.shadowOpacity = 1.0;
_shadowView.layer.shadowRadius = 10.0;
_shadowView.layer.shadowOffset = CGSizeMake(0, 6);
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:_cardView.bounds cornerRadius:18.0];
_shadowView.layer.shadowPath = path.CGPath;
//
[self.shadowView kb_updateShadowPath];
_badgeCircle.layer.cornerRadius = 34;
}