修改布局
This commit is contained in:
@@ -90,35 +90,37 @@
|
||||
make.edges.equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
// 开场白
|
||||
[self.contentView addSubview:self.openingLabel];
|
||||
[self.openingLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.contentView).offset(KB_NAV_TOTAL_HEIGHT);
|
||||
make.left.equalTo(self.contentView).offset(40);
|
||||
make.right.equalTo(self.contentView).offset(-40);
|
||||
}];
|
||||
|
||||
// 头像
|
||||
[self.contentView addSubview:self.avatarImageView];
|
||||
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.contentView).offset(80);
|
||||
make.centerX.equalTo(self.contentView);
|
||||
make.size.mas_equalTo(CGSizeMake(80, 80));
|
||||
make.bottom.equalTo(self.contentView).offset(-KB_TABBAR_HEIGHT - 50 - 20);
|
||||
make.left.equalTo(self.contentView).offset(20);
|
||||
make.size.mas_equalTo(CGSizeMake(54, 54));
|
||||
}];
|
||||
|
||||
// 人设名称
|
||||
[self.contentView addSubview:self.nameLabel];
|
||||
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.avatarImageView.mas_bottom).offset(12);
|
||||
make.centerX.equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
// 开场白
|
||||
[self.contentView addSubview:self.openingLabel];
|
||||
[self.openingLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.nameLabel.mas_bottom).offset(8);
|
||||
make.left.equalTo(self.contentView).offset(40);
|
||||
make.right.equalTo(self.contentView).offset(-40);
|
||||
make.left.equalTo(self.avatarImageView.mas_right).offset(5);
|
||||
make.centerY.equalTo(self.avatarImageView);
|
||||
}];
|
||||
|
||||
// 聊天列表
|
||||
[self.contentView addSubview:self.chatView];
|
||||
[self.chatView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.openingLabel.mas_bottom).offset(30);
|
||||
make.left.right.bottom.equalTo(self.contentView);
|
||||
make.top.equalTo(self.contentView).offset(KB_NAV_TOTAL_HEIGHT);
|
||||
make.left.right.equalTo(self.contentView);
|
||||
make.bottom.equalTo(self.avatarImageView.mas_top).offset(-10);
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
#pragma mark - Setter
|
||||
@@ -337,7 +339,7 @@
|
||||
if (!_avatarImageView) {
|
||||
_avatarImageView = [[UIImageView alloc] init];
|
||||
_avatarImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
_avatarImageView.layer.cornerRadius = 40;
|
||||
_avatarImageView.layer.cornerRadius = 27;
|
||||
_avatarImageView.layer.borderWidth = 3;
|
||||
_avatarImageView.layer.borderColor = [UIColor whiteColor].CGColor;
|
||||
_avatarImageView.clipsToBounds = YES;
|
||||
|
||||
Reference in New Issue
Block a user