This commit is contained in:
启星
2025-09-24 09:14:50 +08:00
parent 3b6b02f950
commit d361de3687
18 changed files with 71 additions and 33 deletions

View File

@@ -210,7 +210,7 @@
}
for (int i = 0;i<userModel.icon.count;i++) {
NSString*icon = userModel.icon[i];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.nameLabel.left+i*ScaleWidth(42), self.idLabel.bottom+5, ScaleWidth(42), ScaleWidth(16))];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.nameLabel.left+i*UserIconWidth, self.idLabel.bottom+5, UserIconWidth, UserIconHeight)];
[imageView sd_setImageWithURL:[NSURL URLWithString:icon]];
[self addSubview:imageView];
[self.iconArray addObject:imageView];

View File

@@ -104,7 +104,7 @@
}];
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake(42, 16);
layout.itemSize = CGSizeMake(UserIconWidth, UserIconHeight);
layout.minimumLineSpacing = 7;
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];

View File

@@ -274,8 +274,8 @@
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
CGFloat iconWidth = 38;
CGFloat iconHeight = 16;
CGFloat iconWidth = UserIconWidth;
CGFloat iconHeight = UserIconHeight;
CGFloat margin = 6;
for (int i = 0; i < 3; i++) {
UIImageView *iconImageView = [[UIImageView alloc] init];