个人资料页代码整理

整理 userinfomodel
This commit is contained in:
eggmanQQQ
2024-07-06 17:20:41 +08:00
parent 8adb50763d
commit cfa67aa4ac
3 changed files with 209 additions and 278 deletions

View File

@@ -107,7 +107,7 @@ return view;\
///
@property (nonatomic,strong) UIView * signBackView;
///
@property (nonatomic,strong) UILabel *signLabel;
@property (nonatomic,strong) UILabel *signatureLabel;
///线
//@property (nonatomic,strong) UIView * lineView;
///
@@ -386,8 +386,8 @@ return view;\
}
- (void)setupCustomDesc {
[self.userInfoView addSubview:self.signLabel];
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
[self.userInfoView addSubview:self.signatureLabel];
[self.signatureLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.userInfoView);
make.top.mas_equalTo(self.tagStackView.mas_bottom).offset(4);
make.width.mas_equalTo(KScreenWidth - 70);
@@ -397,7 +397,7 @@ return view;\
- (void)setupRelationshipArea {
[self.userInfoView addSubview:self.relationshipView];
[self.relationshipView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.signLabel.mas_bottom).offset(10);
make.top.mas_equalTo(self.signatureLabel.mas_bottom).offset(10);
make.left.mas_equalTo(self.userInfoView).offset(14);
make.right.mas_equalTo(self.userInfoView).offset(-14);
make.height.mas_equalTo(55);
@@ -456,7 +456,7 @@ return view;\
[self.singStackView addArrangedSubview:self.tagView];
[self.singStackView addArrangedSubview:self.signBackView];
[self.signBackView addSubview:self.signLabel];
[self.signBackView addSubview:self.signatureLabel];
@kWeakify(self);
SVGAParser * parser = [[SVGAParser alloc]init];
@@ -471,73 +471,6 @@ return view;\
}];
}
- (void)initSubViewConstraints {
[self.reviewIcon mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.trailing.mas_equalTo(self);
make.width.mas_equalTo(85);
make.height.mas_equalTo(50);
}];
// [self.onlineView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.bottom.equalTo(self.avatarView);
// make.width.mas_equalTo(84);
// make.leading.mas_equalTo(4);
// make.height.mas_equalTo(22);
//
// }];
[self.onlineIconView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(18);
make.top.mas_equalTo(3);
make.width.mas_equalTo(12);
make.height.mas_equalTo(12);
}];
// [self.onlineTitleView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.centerY.equalTo(self.onlineIconView);
// make.leading.mas_equalTo(32);
// make.height.mas_equalTo(14);
// }];
// [self.onlineButton mas_makeConstraints:^(MASConstraintMaker *make) {
// make.edges.equalTo(self.onlineView);
// }];
[self.pageButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.trailing.mas_equalTo(-15);
make.width.mas_equalTo(42);
make.height.mas_equalTo(22);
make.bottom.mas_equalTo(self.userInfoView.mas_top).offset(-8);
}];
[self.experImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(20);
make.width.mas_equalTo(34);
}];
[self.singStackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(15);
make.top.mas_equalTo(103);
make.trailing.mas_equalTo(-15);
}];
[self.tagView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.trailing.equalTo(self.singStackView);
make.height.mas_equalTo(20);
}];
[self.signBackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_greaterThanOrEqualTo(10);
make.leading.trailing.equalTo(self.singStackView);
make.bottom.equalTo(self.userInfoView.mas_bottom).mas_offset(-17);
}];
[self.signLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.equalTo(self.signBackView);
}];
// [self.userShadowImageView.superview layoutIfNeeded];
}
#pragma mark - SDPhotoBrowserDelegate
- (NSURL *)photoBrowser:(SDPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index {
if(browser.isAvatar == YES){
@@ -575,15 +508,7 @@ return view;\
UIPasteboard *pasteboard = [UIPasteboard generalPasteboard];
pasteboard. string = [NSString stringWithFormat:@"%ld", (long)_userInfo.erbanNo];
}
-(void)toSoundAction{
}
-(void)setPlaySoundStatus:(BOOL)isPlay{
}
-(void)setPlaySoundTime:(NSInteger)time{
}
#pragma mark - XPMineUserInfoHeaderTagView
- (void)didClickGotoIvidualView{
if(self.delegate && [self.delegate respondsToSelector:@selector(xPMineUserInfoHeaderView:didClickGotoEditView:)]){
@@ -606,14 +531,13 @@ return view;\
browser.isAvatar = YES;
[browser show];
}
- (void)onlineButtonAction:(UIButton *)sender {
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineUserInfoHeaderView:didClickGoToRoom:)]) {
[self.delegate xPMineUserInfoHeaderView:self didClickGoToRoom:self.roomUid];
}
}
-(void)playSoundAction{
}
#pragma mark - Getters And Setters
- (CGFloat)widthOfText:(NSString *)text withFont:(UIFont *)font {
NSDictionary *attributes = @{NSFontAttributeName: font};
@@ -623,202 +547,94 @@ return view;\
- (void)setUserInfo:(UserInfoModel *)userInfo {
_userInfo = userInfo;
if (_userInfo) {
self.nameLabel.text = userInfo.nick;
// CGFloat width = [self widthOfText:userInfo.nick withFont:self.nameLabel.font];
// [self.nameLabel mas_updateConstraints:^(MASConstraintMaker *make) {
// make.width.mas_equalTo(width);
// }];
if (!_userInfo) {
return;
}
NSString *locateString = @"";
if (userInfo.region.length > 0) {
// if (isMSRTL()) {
// locateString = [NSString stringWithFormat:@" | %@", userInfo.region];
// } else {
locateString = [NSString stringWithFormat:@"%@ | ", userInfo.region];
// }
}
NSDate *date = [NSDate dateWithTimeIntervalSince1970:userInfo.birth/1000];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
NSString *dateString = [dateFormatter stringFromDate:date];
[self updateNameAndGenderInfo];
[self updateIDInfo];
[self updateLocateAndRegionInfo];
[self updateSignatureInfo];
[self updateRelationShipInfo];
[self updateHeadwearInfo];
// if (isMSRTL()) {
// self.locateLabel.text = [NSString stringWithFormat:@"%@%@", dateString, locateString];
// } else {
self.locateLabel.text = [NSString stringWithFormat:@"%@%@", locateString, dateString];
// }
self.officialImageView.hidden = userInfo.defUser != UserLevelType_Offical;
self.newUserImageView.hidden = !userInfo.newUser;
NSString *text = @"";
BOOL hasBeautifulID = userInfo.hasPrettyErbanNo;
if (hasBeautifulID) {
text = [NSString stringWithFormat:@"%ld", (long)_userInfo.erbanNo];
} else {
text = [NSString stringWithFormat:@" %ld", (long)_userInfo.erbanNo];
}
NSString *offsetSpace = @"";
if (hasBeautifulID) {
if (_userInfo.erbanNo > 9) {
offsetSpace = @" ";
} else if (_userInfo.erbanNo > 99) {
offsetSpace = @" ";
} else if (_userInfo.erbanNo > 999) {
offsetSpace = @"";
}
}
self.idLabel.text = [NSString stringWithFormat:@"%@%@",offsetSpace,text];
self.beautifulImageView.hidden = !hasBeautifulID;
self.idIconImageView.hidden = hasBeautifulID;
if (hasBeautifulID) {
self.idLabel.alpha = 1;
self.idLabel.textColor = [UIColor whiteColor];
if (_userInfo.erbanNo > 999) {
//
UIImage *originalImage = [UIImage imageNamed:@"user_info_id_beatiful_mark"];
// (cap insets)
UIEdgeInsets capInsets = UIEdgeInsetsMake(0, 20, 0, 4);
//
UIImage *resizableImage = [originalImage resizableImageWithCapInsets:capInsets resizingMode:UIImageResizingModeStretch];
//
self.beautifulImageView.image = resizableImage;
} else {
UIImage *originalImage = [UIImage imageNamed:@"user_info_id_beatiful_mark_short"];
self.beautifulImageView.image = originalImage;
}
[self.copyIdImageView mas_updateConstraints:^(MASConstraintMaker *make) {
if (isMSRTL()) {
make.right.mas_equalTo(self.idLabel.mas_left).offset(-24);
} else {
make.left.mas_equalTo(self.idLabel.mas_right).offset(6);
}
if (userInfo.userLevelVo.experUrl) {
[self.experImageView loadImageWithUrl:userInfo.userLevelVo.experUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
self.experImageView.image = image;
CGFloat width = image.size.width*20/ (image.size.height > 0 ? image.size.height : 1);
[self.experImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(20);
make.width.mas_equalTo(width);
}];
} else {
self.idLabel.alpha = 0.8;
[self.copyIdImageView mas_updateConstraints:^(MASConstraintMaker *make) {
if (isMSRTL()) {
make.right.mas_equalTo(self.idLabel.mas_left).offset(-24);
} else {
make.left.mas_equalTo(self.idLabel.mas_right).offset(2);
}
}];
}
self.experImageView.hidden = userInfo.userLevelVo.experUrl.length <= 0;
if (userInfo.userLevelVo.charmUrl) {
[self.charmImageView loadImageWithUrl:userInfo.userLevelVo.charmUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
self.charmImageView.image = image;
CGFloat width = image.size.width*20/ (image.size.height > 0 ? image.size.height : 1);
[self.charmImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(20);
make.width.mas_equalTo(width);
}];
}
self.signLabel.text = _userInfo.userDesc.length > 0 ? _userInfo.userDesc : YMLocalizedString(@"XPMineUserInfoHeaderView6");
[self.signLabel setTextColor:_userInfo.userDesc.length > 0 ? UIColorFromRGB(0x1a1a1a) : UIColorRGBAlpha(0x1a1a1a, 0.6)];
[self.signLabel setFont:_userInfo.userDesc.length > 0 ? [UIFont systemFontOfSize:12 weight:UIFontWeightMedium] : [UIFont systemFontOfSize:12 weight:UIFontWeightRegular]];
self.fansNum.text = [@(_userInfo.fansNum) stringValue];
self.followersNum.text = [@(_userInfo.followNum) stringValue];
UIImage *sexBackgroundImage = nil;
if (_userInfo.gender == GenderType_Male) {
sexBackgroundImage = [UIImage gradientColorImageFromColors:@[UIColorRGBAlpha(0x6BB3FF, 0.5),UIColorFromRGB(0x6BB3FF)]
gradientType:GradientTypeTopToBottom
imgSize:CGSizeMake(35, 16)];
}] ;
}
self.charmImageView.hidden = userInfo.userLevelVo.charmUrl.length <= 0;
if(userInfo.isCustomWord == YES){
if (userInfo.nameplatePic.length > 0) {
self.nameplateImageView.imageUrl = userInfo.nameplatePic;
self.namePlateView.hidden = NO;
} else {
sexBackgroundImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xF2A0C3),UIColorFromRGB(0xEB74A6)]
gradientType:GradientTypeTopToBottom
imgSize:CGSizeMake(35, 16)];
self.namePlateView.hidden = YES;
}
[self.sexImageView setTitle:[NSString getAgeWithBirth:_userInfo.birth] forState:UIControlStateNormal];
// self.sexImageView.backgroundColor = _userInfo.gender == GenderType_Male ? UIColorFromRGB(0x6BB3FF) :UIColorFromRGB(0xFF80CC);
[self.sexImageView setBackgroundImage:sexBackgroundImage forState:UIControlStateNormal];
// self.sexImageView.titleEdgeInsets = _userInfo.gender != GenderType_Male ? UIEdgeInsetsMake(0, 2, 0, 0):UIEdgeInsetsMake(0, -1, 0, 0);
// self.sexImageView.selected = _userInfo.gender != GenderType_Male;
self.officialImageView.hidden = userInfo.defUser != UserLevelType_Offical;
self.newUserImageView.hidden = !userInfo.newUser;
NSString * headerUrl = userInfo.headwearEffect.length > 0 ? userInfo.headwearEffect : userInfo.headwearPic;
if (headerUrl.length >0) {
self.headWearImageView.hidden = NO;
NSURL *url = [NSURL URLWithString:headerUrl];
@kWeakify(self);
[self.manager loadSpriteSheetImageWithURL:url completionBlock:^(YYSpriteSheetImage * _Nullable sprit) {
@kStrongify(self);
self.headWearImageView.image = sprit;
} failureBlock:^(NSError * _Nullable error) {
}];
}else{
if (userInfo.nameplateWord.length > 0 && userInfo.nameplatePic.length > 0) {
self.nameplateImageView.imageUrl = userInfo.nameplatePic;
self.nameplateLabel.text = userInfo.nameplateWord;
self.namePlateView.hidden = NO;
} else {
self.headWearImageView.hidden = YES;
self.namePlateView.hidden = YES;
}
}
if (userInfo.userLevelVo.experUrl) {
[self.experImageView loadImageWithUrl:userInfo.userLevelVo.experUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
self.experImageView.image = image;
CGFloat width = image.size.width*20/ (image.size.height > 0 ? image.size.height : 1);
[self.experImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(20);
make.width.mas_equalTo(width);
}];
}];
self.rechargeImageView.hidden = !_userInfo.isRechargeUser;
[self.userPhotoArray removeAllObjects];
//
NSMutableArray * imageUrls = [NSMutableArray array];
if (userInfo.avatar) {
[imageUrls addObject:userInfo.avatar];
if (![self.userPhotoArray containsObject:self.avatarPhoto]) {
[self.userPhotoArray addObject:self.avatarPhoto];
}
self.experImageView.hidden = userInfo.userLevelVo.experUrl.length <= 0;
if (userInfo.userLevelVo.charmUrl) {
[self.charmImageView loadImageWithUrl:userInfo.userLevelVo.charmUrl completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
self.charmImageView.image = image;
CGFloat width = image.size.width*20/ (image.size.height > 0 ? image.size.height : 1);
[self.charmImageView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(20);
make.width.mas_equalTo(width);
}];
}] ;
}
self.charmImageView.hidden = userInfo.userLevelVo.charmUrl.length <= 0;
if(userInfo.isCustomWord == YES){
if (userInfo.nameplatePic.length > 0) {
self.nameplateImageView.imageUrl = userInfo.nameplatePic;
self.namePlateView.hidden = NO;
} else {
self.namePlateView.hidden = YES;
}
}else{
if (userInfo.nameplateWord.length > 0 && userInfo.nameplatePic.length > 0) {
self.nameplateImageView.imageUrl = userInfo.nameplatePic;
self.nameplateLabel.text = userInfo.nameplateWord;
self.namePlateView.hidden = NO;
} else {
self.namePlateView.hidden = YES;
}
}
self.rechargeImageView.hidden = !_userInfo.isRechargeUser;
[self.userPhotoArray removeAllObjects];
//
NSMutableArray * imageUrls = [NSMutableArray array];
if (userInfo.avatar) {
[imageUrls addObject:userInfo.avatar];
if (![self.userPhotoArray containsObject:self.avatarPhoto]) {
[self.userPhotoArray addObject:self.avatarPhoto];
}
self.avatarPhoto.isReview = userInfo.isReview;
self.avatarPhoto.photoUrl = userInfo.avatar;
self.avatarView.imageUrl = userInfo.avatar;
}
if (self.userInfo.privatePhoto.count > 0) {
for (int i = 0; i < self.userInfo.privatePhoto.count; i++) {
UserPhoto * photo = [self.userInfo.privatePhoto objectAtIndex:i];
if (photo.photoUrl.length > 0) {
[self.userPhotoArray addObject:photo];
[imageUrls addObject:photo.photoUrl];
}
}
}
if (imageUrls.count > 0) {
self.imageUrls = imageUrls;
self.pi_cycleScrollView.imageURLStringsGroup = imageUrls;
[self.pageButton setTitle:[NSString stringWithFormat:@"1/%lu",(unsigned long)imageUrls.count] forState:UIControlStateNormal];;
//
if(self.userPhotoArray.count > 0){
self.reviewIcon.hidden = ![self.userPhotoArray objectAtIndex:0].isReview;
self.avatarPhoto.isReview = userInfo.isReview;
self.avatarPhoto.photoUrl = userInfo.avatar;
self.avatarView.imageUrl = userInfo.avatar;
}
if (self.userInfo.privatePhoto.count > 0) {
for (int i = 0; i < self.userInfo.privatePhoto.count; i++) {
UserPhoto * photo = [self.userInfo.privatePhoto objectAtIndex:i];
if (photo.photoUrl.length > 0) {
[self.userPhotoArray addObject:photo];
[imageUrls addObject:photo.photoUrl];
}
}
}
if (imageUrls.count > 0) {
self.imageUrls = imageUrls;
self.pi_cycleScrollView.imageURLStringsGroup = imageUrls;
[self.pageButton setTitle:[NSString stringWithFormat:@"1/%lu",(unsigned long)imageUrls.count] forState:UIControlStateNormal];;
//
if(self.userPhotoArray.count > 0){
self.reviewIcon.hidden = ![self.userPhotoArray objectAtIndex:0].isReview;
}
}
self.nobleImageView.hidden = userInfo.userVipInfoVO.vipIcon.length == 0;
[self.nobleImageView loadImageWithUrl:userInfo.userVipInfoVO.vipIcon completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) {
self.nobleImageView.image = image;
@@ -866,14 +682,129 @@ return view;\
}
_tagView.uid = @(self.userInfo.uid).stringValue;
_tagView.itemList = itemList;
}
- (void)updateNameAndGenderInfo {
self.nameLabel.text = self.userInfo.nick;
UIImage *sexBackgroundImage = nil;
if (self.userInfo.gender == GenderType_Male) {
sexBackgroundImage = [UIImage gradientColorImageFromColors:@[UIColorRGBAlpha(0x6BB3FF, 0.5),UIColorFromRGB(0x6BB3FF)]
gradientType:GradientTypeTopToBottom
imgSize:CGSizeMake(35, 16)];
} else {
sexBackgroundImage = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xF2A0C3),UIColorFromRGB(0xEB74A6)]
gradientType:GradientTypeTopToBottom
imgSize:CGSizeMake(35, 16)];
}
[self.sexImageView setTitle:[NSString getAgeWithBirth:self.userInfo.birth] forState:UIControlStateNormal];
[self.sexImageView setBackgroundImage:sexBackgroundImage forState:UIControlStateNormal];
}
- (void)updateIDInfo {
NSString *text = @"";
BOOL hasBeautifulID = self.userInfo.hasPrettyErbanNo;
if (hasBeautifulID) {
text = [NSString stringWithFormat:@"%ld", (long)self.userInfo.erbanNo];
} else {
text = [NSString stringWithFormat:@" %ld", (long)self.userInfo.erbanNo];
}
NSString *offsetSpace = @"";
if (hasBeautifulID) {
if (self.userInfo.erbanNo > 9) {
offsetSpace = @" ";
} else if (self.userInfo.erbanNo > 99) {
offsetSpace = @" ";
} else if (self.userInfo.erbanNo > 999) {
offsetSpace = @"";
}
}
self.idLabel.text = [NSString stringWithFormat:@"%@%@",offsetSpace,text];
self.beautifulImageView.hidden = !hasBeautifulID;
self.idIconImageView.hidden = hasBeautifulID;
if (hasBeautifulID) {
self.idLabel.alpha = 1;
self.idLabel.textColor = [UIColor whiteColor];
if (self.userInfo.erbanNo > 999) {
UIImage *longBackgroundImage = [UIImage imageNamed:@"user_info_id_beatiful_mark"];
UIEdgeInsets capInsets = UIEdgeInsetsMake(0, 20, 0, 4);
UIImage *resizableImage = [longBackgroundImage resizableImageWithCapInsets:capInsets resizingMode:UIImageResizingModeStretch];
self.beautifulImageView.image = resizableImage;
} else {
UIImage *idMark = [UIImage imageNamed:@"user_info_id_beatiful_mark_short"];
self.beautifulImageView.image = idMark;
}
[self.copyIdImageView mas_updateConstraints:^(MASConstraintMaker *make) {
if (isMSRTL()) {
make.right.mas_equalTo(self.idLabel.mas_left).offset(-24);
} else {
make.left.mas_equalTo(self.idLabel.mas_right).offset(6);
}
}];
} else {
self.idLabel.alpha = 0.8;
[self.copyIdImageView mas_updateConstraints:^(MASConstraintMaker *make) {
if (isMSRTL()) {
make.right.mas_equalTo(self.idLabel.mas_left).offset(-24);
} else {
make.left.mas_equalTo(self.idLabel.mas_right).offset(2);
}
}];
}
}
- (void)updateLocateAndRegionInfo {
NSString *locateString = @"";
if (self.userInfo.region.length > 0) {
locateString = [NSString stringWithFormat:@"%@ | ", self.userInfo.region];
}
NSDate *date = [NSDate dateWithTimeIntervalSince1970:self.userInfo.birth/1000];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
NSString *dateString = [dateFormatter stringFromDate:date];
self.locateLabel.text = [NSString stringWithFormat:@"%@%@", locateString, dateString];
}
- (void)updateSignatureInfo {
self.signatureLabel.text = _userInfo.userDesc.length > 0 ? self.userInfo.userDesc : YMLocalizedString(@"XPMineUserInfoHeaderView6");
[self.signatureLabel setTextColor:self.userInfo.userDesc.length > 0 ? UIColorFromRGB(0x1a1a1a) : UIColorRGBAlpha(0x1a1a1a, 0.6)];
[self.signatureLabel setFont:self.userInfo.userDesc.length > 0 ? [UIFont systemFontOfSize:12 weight:UIFontWeightMedium] : [UIFont systemFontOfSize:12 weight:UIFontWeightRegular]];
}
- (void)updateRelationShipInfo {
self.fansNum.text = [@(self.userInfo.fansNum) stringValue];
self.followersNum.text = [@(self.userInfo.followNum) stringValue];
}
- (void)updateHeadwearInfo {
NSString * headerUrl = self.userInfo.headwearEffect.length > 0 ? self.userInfo.headwearEffect : self.userInfo.headwearPic;
if (headerUrl.length == 0) {
self.headWearImageView.hidden = YES;
} else {
self.headWearImageView.hidden = NO;
if (self.userInfo.headwearPic) {
}
NSURL *url = [NSURL URLWithString:headerUrl];
@kWeakify(self);
[self.manager loadSpriteSheetImageWithURL:url completionBlock:^(YYSpriteSheetImage * _Nullable sprit) {
@kStrongify(self);
self.headWearImageView.image = sprit;
} failureBlock:^(NSError * _Nullable error) {
}];
}
}
#pragma mark - Getters
- (UIView *)userInfoView {
if (!_userInfoView) {
_userInfoView = [[UIView alloc] init];
_userInfoView.backgroundColor = [UIColor whiteColor];
// _userInfoView.backgroundColor = [UIColor yellowColor];
_userInfoView.layer.masksToBounds = YES;
_userInfoView.layer.cornerRadius = 16;
_userInfoView.clipsToBounds = YES;
@@ -1167,15 +1098,15 @@ return view;\
return _signBackView;
}
- (UILabel *)signLabel {
if (!_signLabel) {
_signLabel = [[UILabel alloc] init];
_signLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
_signLabel.textColor = UIColorFromRGB(0x1a1a1a);
_signLabel.numberOfLines = 0;
_signLabel.textAlignment = NSTextAlignmentCenter;
- (UILabel *)signatureLabel {
if (!_signatureLabel) {
_signatureLabel = [[UILabel alloc] init];
_signatureLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
_signatureLabel.textColor = UIColorFromRGB(0x1a1a1a);
_signatureLabel.numberOfLines = 0;
_signatureLabel.textAlignment = NSTextAlignmentCenter;
}
return _signLabel;
return _signatureLabel;
}
- (NSMutableArray *)userPhotoArray {

View File

@@ -85,13 +85,12 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy) NSString *viewUrl;
///用户信息中的 座驾昵称 并不需要CarModel 映射一下吧
@property (nonatomic,copy) NSString *carName;
///用户信息中的 头饰的动画 并不需要HeadwearModel 映射一下吧
///用户信息中的 头饰的动画 HeadwearModel 映射而来
@property (nonatomic,copy) NSString *headwearEffect;
///用户信息中的 头饰的动画 如果没有的话 就用这个 并不需要HeadwearModel 映射一下吧
///用户信息中的 头饰的动画 如果没有的话 就用这个 HeadwearModel 映射而来
@property (nonatomic,copy) NSString *headwearPic;
//@property (nonatomic,copy) NSString *headwearSVGA;
@property (nonatomic,assign) NSInteger headwearType; // 1 = svga, 同样适用 headwearEffect
///头饰(新字段) 上麦的时候 在扩展字段中的 只用在坑位上
@property (nonatomic,assign) NSInteger headwearType; // 1 = svga, 表示 headwearEffect 是 svga 的链接
///头饰(新字段) 上麦的时候 在扩展字段中的 只用在坑位上 从 HeadwearModel 映射而来
@property (nonatomic,copy) NSString *headWearUrl;
#pragma mark - 相亲房的字段
///是否为相亲模式VIP坑位

View File

@@ -27,6 +27,7 @@
@"otherViewType": @"carport.otherViewType",
@"headwearEffect" : @"userHeadwear.effect",
@"headwearPic" : @"userHeadwear.pic",
@"headWearUrl" : @"userHeadwear.type",
@"carName": @"carport.name",
@"reviewingAvatar" : @"newAvatar"
};