Skip to content

Commit 89d7084

Browse files
committed
会员头像
1 parent 8496ec9 commit 89d7084

23 files changed

+113
-6
lines changed

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 72 additions & 0 deletions
Large diffs are not rendered by default.

Coding_iOS/Coding_iOS-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>APPL</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>4.4</string>
20+
<string>4.4.5</string>
2121
<key>CFBundleSignature</key>
2222
<string>????</string>
2323
<key>CFBundleURLTypes</key>
@@ -36,7 +36,7 @@
3636
</dict>
3737
</array>
3838
<key>CFBundleVersion</key>
39-
<string>4.4.201704282000</string>
39+
<string>4.4.5.201706021100</string>
4040
<key>ITSAppUsesNonExemptEncryption</key>
4141
<false/>
4242
<key>LSApplicationQueriesSchemes</key>

Coding_iOS/Images/vip/vip_3_30@2x.png

1.13 KB
Loading

Coding_iOS/Images/vip/vip_3_30@3x.png

2.08 KB
Loading

Coding_iOS/Images/vip/vip_3_40@2x.png

1.37 KB
Loading

Coding_iOS/Images/vip/vip_3_40@3x.png

2.64 KB
Loading

Coding_iOS/Images/vip/vip_3_45@2x.png

1.75 KB
Loading

Coding_iOS/Images/vip/vip_3_45@3x.png

3.13 KB
Loading

Coding_iOS/Images/vip/vip_3_75@2x.png

3.69 KB
Loading

Coding_iOS/Images/vip/vip_3_75@3x.png

6.73 KB
Loading

Coding_iOS/Images/vip/vip_4_30@2x.png

1.02 KB
Loading

Coding_iOS/Images/vip/vip_4_30@3x.png

1.75 KB
Loading

Coding_iOS/Images/vip/vip_4_40@2x.png

1.21 KB
Loading

Coding_iOS/Images/vip/vip_4_40@3x.png

2.12 KB
Loading

Coding_iOS/Images/vip/vip_4_45@2x.png

1.45 KB
Loading

Coding_iOS/Images/vip/vip_4_45@3x.png

2.55 KB
Loading

Coding_iOS/Images/vip/vip_4_75@2x.png

2.87 KB
Loading

Coding_iOS/Images/vip/vip_4_75@3x.png

5.15 KB
Loading

Coding_iOS/Models/User.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@property (readwrite, nonatomic, strong) NSString *avatar, *name, *global_key, *path, *slogan, *company, *tags_str, *tags, *location, *job_str, *job, *email, *birthday, *pinyinName;
1313
@property (readwrite, nonatomic, strong) NSString *curPassword, *resetPassword, *resetPasswordConfirm, *phone, *introduction, *phone_country_code, *country;
1414

15-
@property (readwrite, nonatomic, strong) NSNumber *id, *sex, *follow, *followed, *fans_count, *follows_count, *tweets_count, *status, *points_left, *email_validation, *is_phone_validated;
15+
@property (readwrite, nonatomic, strong) NSNumber *id, *sex, *follow, *followed, *fans_count, *follows_count, *tweets_count, *status, *points_left, *email_validation, *is_phone_validated, *vip;
1616
@property (readwrite, nonatomic, strong) NSDate *created_at, *last_logined_at, *last_activity_at, *updated_at;
1717

1818
+ (User *)userWithGlobalKey:(NSString *)global_key;

Coding_iOS/Views/Cell/EaseUserInfoCell.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
@interface EaseUserInfoCell ()
1616
@property (nonatomic, strong) UIButton *headIconButton;
17+
@property (strong, nonatomic) UIImageView *vipV;
1718
@property (nonatomic, strong) UIButton *fansButton; //粉丝
1819
@property (nonatomic, strong) UIButton *followsButton; //关注
1920
@property (nonatomic, strong) UIButton *addFollowsButton; //添加关注
@@ -115,6 +116,12 @@ - (void)creatView {
115116
[_headIconButton addTarget:self action:@selector(userIconButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
116117
[self.contentView addSubview:_headIconButton];
117118

119+
_vipV = [UIImageView new];
120+
[self.contentView addSubview:_vipV];
121+
[_vipV mas_makeConstraints:^(MASConstraintMaker *make) {
122+
make.right.bottom.equalTo(_headIconButton);
123+
}];
124+
118125
_fansButton = [[UIButton alloc] init];
119126
_fansButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
120127
_fansButton.titleLabel.font = [UIFont boldSystemFontOfSize:15];
@@ -223,6 +230,8 @@ - (void)setUser:(User *)user {
223230
}
224231

225232
[_headIconButton sd_setBackgroundImageWithURL:[user.avatar urlImageWithCodePathResize:2* _headIconButton.width] forState:UIControlStateNormal placeholderImage:kPlaceholderMonkeyRoundWidth(54.0)];
233+
_vipV.image = [UIImage imageNamed:[NSString stringWithFormat:@"vip_%@_75", _user.vip]];
234+
226235
[_fansButton setTitle:[NSString stringWithFormat:@"粉丝 %@", user.fans_count.stringValue] forState:UIControlStateNormal];
227236
[_fansButton.titleLabel colorTextWithColor:[UIColor colorWithRGBHex:0x76808e] range:NSMakeRange(0, 2)];
228237
[_fansButton.titleLabel fontTextWithFont:[UIFont systemFontOfSize:12] range:NSMakeRange(0, 2)];

Coding_iOS/Views/Cell/MeRootUserCell.m

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#import "MeRootUserCell.h"
1010

1111
@interface MeRootUserCell ()
12-
@property (strong, nonatomic) UIImageView *userV;
12+
@property (strong, nonatomic) UIImageView *userV, *vipV;
1313
@property (strong, nonatomic) UILabel *userL, *gkL;
1414
@end
1515

@@ -48,7 +48,14 @@ - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSStr
4848
make.left.right.equalTo(_userL);
4949
make.height.mas_equalTo(20);
5050
}];
51-
51+
if (!_vipV) {
52+
_vipV = [UIImageView new];
53+
[self.contentView addSubview:_vipV];
54+
[_vipV mas_makeConstraints:^(MASConstraintMaker *make) {
55+
make.right.bottom.equalTo(_userV);
56+
make.size.mas_equalTo(CGSizeMake(18, 18));
57+
}];
58+
}
5259
}
5360
return self;
5461
}
@@ -59,6 +66,7 @@ - (void)setCurUser:(User *)curUser{
5966
[_userV sd_setImageWithURL:[_curUser.avatar urlImageWithCodePathResize:50* 2]];
6067
_userL.text = _curUser.name;
6168
_gkL.text = [NSString stringWithFormat:@"个性后缀:%@", _curUser.global_key];
69+
_vipV.image = [UIImage imageNamed:[NSString stringWithFormat:@"vip_%@_45", _curUser.vip]];
6270
}
6371

6472
+ (CGFloat)cellHeight{

Coding_iOS/Views/Cell/TweetCell.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ @interface TweetCell ()
4343

4444
@property (strong, nonatomic) UIView *topView;
4545
@property (strong, nonatomic) UITapImageView *ownerImgView;
46+
@property (strong, nonatomic) UIImageView *vipV;
4647
@property (strong, nonatomic) UIButton *ownerNameBtn;
4748
@property (strong, nonatomic) UITTTAttributedLabel *contentLabel;
4849
@property (strong, nonatomic) UILabel *timeLabel, *fromLabel;
@@ -206,6 +207,13 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
206207
_commentOrLikeSplitlineView.image = [UIImage imageNamed:@"splitlineImg"];
207208
[self.contentView addSubview:_commentOrLikeSplitlineView];
208209
}
210+
if (!_vipV) {
211+
_vipV = [UIImageView new];
212+
[self.contentView addSubview:_vipV];
213+
[_vipV mas_makeConstraints:^(MASConstraintMaker *make) {
214+
make.right.bottom.equalTo(_ownerImgView);
215+
}];
216+
}
209217
}
210218
return self;
211219
}
@@ -227,6 +235,7 @@ - (void)setTweet:(Tweet *)tweet needTopView:(BOOL)needTopView{
227235
[self.ownerImgView setImageWithUrl:[_tweet.owner.avatar urlImageWithCodePathResizeToView:_ownerImgView] placeholderImage:kPlaceholderMonkeyRoundView(_ownerImgView) tapBlock:^(id obj) {
228236
[weakSelf userBtnClicked];
229237
}];
238+
_vipV.image = [UIImage imageNamed:[NSString stringWithFormat:@"vip_%@_45", _tweet.owner.vip]];
230239
//owner姓名
231240
[self.ownerNameBtn setUserTitle:_tweet.owner.name font:[UIFont systemFontOfSize:17] maxWidth:(kTweetCell_ContentWidth-85)];
232241
//发出冒泡的时间

Coding_iOS/Views/Cell/TweetDetailCell.m

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ @interface TweetDetailCell ()
3333
@property (strong, nonatomic) NSArray *like_reward_users;
3434

3535
@property (strong, nonatomic) UITapImageView *ownerImgView;
36+
@property (strong, nonatomic) UIImageView *vipV;
3637
@property (strong, nonatomic) UIButton *ownerNameBtn;
3738
@property (strong, nonatomic) UILabel *timeLabel, *fromLabel;
3839
@property (strong, nonatomic) UIButton *likeBtn, *commentBtn, *deleteBtn, *rewardBtn;
@@ -161,7 +162,13 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
161162
[_activityIndicator setCenter:CGPointMake(CGRectGetMidX(self.webContentView.frame), kTweetDetailCell_PadingTop+CGRectGetHeight(_activityIndicator.bounds)/2)];
162163
[self.contentView addSubview:_activityIndicator];
163164
}
164-
165+
if (!_vipV) {
166+
_vipV = [UIImageView new];
167+
[self.contentView addSubview:_vipV];
168+
[_vipV mas_makeConstraints:^(MASConstraintMaker *make) {
169+
make.right.bottom.equalTo(_ownerImgView);
170+
}];
171+
}
165172
}
166173
return self;
167174
}
@@ -181,6 +188,8 @@ - (void)setTweet:(Tweet *)tweet{
181188
[self.ownerImgView setImageWithUrl:[_tweet.owner.avatar urlImageWithCodePathResizeToView:_ownerImgView] placeholderImage:kPlaceholderMonkeyRoundView(_ownerImgView) tapBlock:^(id obj) {
182189
[weakSelf userBtnClicked];
183190
}];
191+
_vipV.image = [UIImage imageNamed:[NSString stringWithFormat:@"vip_%@_45", _tweet.owner.vip]];
192+
184193
//owner姓名
185194
// [self.ownerNameBtn setUserTitle:_tweet.owner.name];
186195
[self.ownerNameBtn setUserTitle:_tweet.owner.name font:self.ownerNameBtn.titleLabel.font maxWidth:(kScreen_Width- kTweetDetailCell_PadingLeft - 85)];

0 commit comments

Comments
 (0)