处理所有UI
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
// Masonry 约束
|
||||
[self.shadowView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.equalTo(self.contentView);
|
||||
make.top.equalTo(self.contentView.mas_top).offset(36); // 给圆环留空间
|
||||
make.top.equalTo(self.contentView.mas_top).offset(68 * 0.5); // 给圆环留空间
|
||||
}];
|
||||
|
||||
[self.cardView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -63,9 +63,10 @@
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.cardView.mas_top).offset(78);
|
||||
make.top.equalTo(self.badgeCircle.mas_bottom).offset(13);
|
||||
make.left.equalTo(self.cardView.mas_left).offset(18);
|
||||
make.right.equalTo(self.cardView.mas_right).offset(-18);
|
||||
make.height.mas_equalTo(23);
|
||||
}];
|
||||
|
||||
[self.descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -75,7 +76,7 @@
|
||||
}];
|
||||
|
||||
[self.peopleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.equalTo(self.descLabel.mas_bottom).offset(16);
|
||||
make.top.equalTo(self.descLabel.mas_bottom).offset(8);
|
||||
make.left.equalTo(self.cardView.mas_left).offset(18);
|
||||
make.right.equalTo(self.cardView.mas_right).offset(-18);
|
||||
}];
|
||||
@@ -83,8 +84,8 @@
|
||||
[self.actionBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.cardView.mas_left).offset(18);
|
||||
make.right.equalTo(self.cardView.mas_right).offset(-18);
|
||||
make.bottom.equalTo(self.cardView.mas_bottom).offset(-18);
|
||||
make.height.mas_equalTo(56);
|
||||
make.bottom.equalTo(self.cardView.mas_bottom).offset(-12);
|
||||
make.height.mas_equalTo(32);
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -157,8 +158,8 @@
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [UILabel new];
|
||||
_titleLabel.textColor = [UIColor colorWithWhite:0 alpha:0.95];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:26 weight:UIFontWeightSemibold];
|
||||
_titleLabel.textColor = [UIColor colorWithHex:0x1B1F1A];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _titleLabel;
|
||||
@@ -167,8 +168,8 @@
|
||||
- (UILabel *)descLabel {
|
||||
if (!_descLabel) {
|
||||
_descLabel = [UILabel new];
|
||||
_descLabel.textColor = [UIColor colorWithWhite:0.45 alpha:1];
|
||||
_descLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightRegular];
|
||||
_descLabel.textColor = [UIColor colorWithHex:0x9A9A9A];
|
||||
_descLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular];
|
||||
_descLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_descLabel.numberOfLines = 2;
|
||||
}
|
||||
@@ -178,8 +179,8 @@
|
||||
- (UILabel *)peopleLabel {
|
||||
if (!_peopleLabel) {
|
||||
_peopleLabel = [UILabel new];
|
||||
_peopleLabel.textColor = [UIColor colorWithRed:0.31 green:0.78 blue:0.63 alpha:1.0];
|
||||
_peopleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightSemibold];
|
||||
_peopleLabel.textColor = [UIColor colorWithHex:0x02BEAC];
|
||||
_peopleLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightRegular];
|
||||
_peopleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_peopleLabel.numberOfLines = 2;
|
||||
}
|
||||
@@ -189,10 +190,10 @@
|
||||
- (UIButton *)actionBtn {
|
||||
if (!_actionBtn) {
|
||||
_actionBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
_actionBtn.layer.cornerRadius = 12.0;
|
||||
_actionBtn.layer.cornerRadius = 4.0;
|
||||
_actionBtn.layer.masksToBounds = YES;
|
||||
[_actionBtn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
|
||||
_actionBtn.titleLabel.font = [UIFont systemFontOfSize:28 weight:UIFontWeightSemibold];
|
||||
_actionBtn.titleLabel.font = [UIFont systemFontOfSize:22 weight:UIFontWeightSemibold];
|
||||
[_actionBtn addTarget:self action:@selector(tapAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _actionBtn;
|
||||
|
||||
Reference in New Issue
Block a user