1
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
#import "KBMyKeyBoardVC.h"
|
||||
#import "KBJfPay.h"
|
||||
#import "KBVipPay.h"
|
||||
#import "UIImageView+KBWebImage.h"
|
||||
#import "KBUser.h"
|
||||
|
||||
@interface KBMyHeaderView ()
|
||||
@property (nonatomic, strong) UILabel *titleLabel;
|
||||
@@ -87,6 +89,18 @@
|
||||
self.avatarView.layer.masksToBounds = YES;
|
||||
}
|
||||
|
||||
- (void)configureWithUser:(KBUser *)user {
|
||||
// 名称:优先昵称,兜底展示本地化的“Settings”或固定提示
|
||||
NSString *name = user.nickName;
|
||||
if (name.length == 0) {
|
||||
name = KBLocalized(@"Settings");
|
||||
}
|
||||
self.nameLabel.text = name;
|
||||
|
||||
// 头像:使用通用占位图
|
||||
[self.avatarView kb_setAvatarURL:user.avatarUrl placeholder:KBPlaceholderImage];
|
||||
}
|
||||
|
||||
+ (void)kb_applyGradientTo:(UIView *)view colors:(NSArray *)colors {
|
||||
// 删除旧的渐变层,重复 setNeedsLayout 时避免叠加
|
||||
NSMutableArray<CALayer *> *remove = [NSMutableArray array];
|
||||
|
||||
Reference in New Issue
Block a user