File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,6 +95,15 @@ - (void)updateWithJoinedUsers:(NSArray*)userlist {
9595
9696 [iconView sd_setImageWithURL: [user.avatar urlImageWithCodePathResizeToView: iconView] placeholderImage: [UIImage imageNamed: @" placeholder_monkey_round_48" ]];
9797
98+ {
99+ UIImageView *vipV = [UIImageView new ];
100+ [self addSubview: vipV];
101+ [vipV mas_makeConstraints: ^(MASConstraintMaker *make) {
102+ make.right .bottom .equalTo (iconView);
103+ }];
104+ vipV.image = [UIImage imageNamed: [NSString stringWithFormat: @" vip_%@ _40" , user.vip]];
105+ }
106+
98107 [_avatalist addObject: iconView];
99108 }
100109 }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ @interface UserCell ()
1313@property (strong , nonatomic ) UILabel *userNameLabel;
1414@property (strong , nonatomic ) UIButton *rightBtn;
1515@property (strong , nonatomic ) UIActivityIndicatorView *sendingStatus;
16+ @property (strong , nonatomic ) UIImageView *vipV;
1617
1718@end
1819
@@ -39,6 +40,13 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
3940 [_rightBtn addTarget: self action: @selector (rightBtnClicked: ) forControlEvents: UIControlEventTouchUpInside];
4041 [self .contentView addSubview: _rightBtn];
4142 }
43+ if (!_vipV) {
44+ _vipV = [UIImageView new ];
45+ [self .contentView addSubview: _vipV];
46+ [_vipV mas_makeConstraints: ^(MASConstraintMaker *make) {
47+ make.right .bottom .equalTo (_userIconView);
48+ }];
49+ }
4250 }
4351 return self;
4452}
@@ -49,8 +57,10 @@ - (void)layoutSubviews{
4957 if (!_curUser) {
5058 [_userIconView setImage: [UIImage imageNamed: @" add_user_icon" ]];
5159 _userNameLabel.text = @" 添加好友" ;
60+ _vipV.image = nil ;
5261 }else {
5362 [_userIconView sd_setImageWithURL: [_curUser.avatar urlImageWithCodePathResizeToView: _userIconView] placeholderImage: kPlaceholderMonkeyRoundView (_userIconView)];
63+ _vipV.image = [UIImage imageNamed: [NSString stringWithFormat: @" vip_%@ _40" , _curUser.vip]];
5464 _userNameLabel.text = _curUser.name ;
5565 }
5666
You can’t perform that action at this time.
0 commit comments