fix
This commit is contained in:
@@ -43,57 +43,7 @@
|
||||
make.bottom.mas_equalTo(self.mas_bottom);
|
||||
}];
|
||||
|
||||
UIImageView *jianyiImageView = [[UIImageView alloc] init];
|
||||
jianyiImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
jianyiImageView.image = [UIImage imageNamed:@"share_tim"];
|
||||
[self addSubview:jianyiImageView];
|
||||
[jianyiImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.mas_left).offset(40);
|
||||
make.top.mas_equalTo(self.mas_top).offset(36);
|
||||
if (KMainW < 375) {
|
||||
make.size.mas_equalTo(CGSizeMake(139, 30));
|
||||
}else{
|
||||
make.size.mas_equalTo(CGSizeMake(179, 30));
|
||||
}
|
||||
|
||||
}];
|
||||
|
||||
//时间⌚️
|
||||
UILabel *timeLabel = [[UILabel alloc] init];
|
||||
timeLabel.textColor = [UIColor blackColor];
|
||||
if (KMainW < 375) {
|
||||
timeLabel.font = GIGA_TEXTFONTBOLD(24);
|
||||
}else{
|
||||
timeLabel.font = GIGA_TEXTFONTBOLD(35);
|
||||
}
|
||||
timeLabel.text = @"17";
|
||||
self.timeLabel = timeLabel;
|
||||
[self addSubview:timeLabel];
|
||||
[timeLabel sizeToFit];
|
||||
[timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.mas_left).offset(73);
|
||||
make.top.mas_equalTo(jianyiImageView.mas_bottom).offset(20);
|
||||
}];
|
||||
|
||||
//分钟图片
|
||||
UIImageView *minueImageview = [[UIImageView alloc] init];
|
||||
minueImageview.image = [UIImage imageNamed:@"share_minute"];
|
||||
minueImageview.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[self addSubview:minueImageview];
|
||||
[minueImageview mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.left.mas_equalTo(timeLabel.mas_right);
|
||||
if (KMainW < 375) {
|
||||
//se 5s
|
||||
make.size.mas_equalTo(CGSizeMake(48, 49));
|
||||
|
||||
}else{
|
||||
make.size.mas_equalTo(CGSizeMake(72, 49));
|
||||
}
|
||||
|
||||
make.centerY.mas_equalTo(timeLabel.mas_centerY);
|
||||
}];
|
||||
|
||||
|
||||
//左侧红色梯形区域
|
||||
|
||||
UIView *colorView = [[UIView alloc] init];
|
||||
@@ -118,6 +68,57 @@
|
||||
|
||||
}];
|
||||
|
||||
UIImageView *jianyiImageView = [[UIImageView alloc] init];
|
||||
jianyiImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
jianyiImageView.image = [UIImage imageNamed:@"share_tim"];
|
||||
[self addSubview:jianyiImageView];
|
||||
[jianyiImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(colorView.mas_left).offset((KMainW - 82)*0.424);
|
||||
make.top.mas_equalTo(self.mas_top).offset(36);
|
||||
if (KMainW < 375) {
|
||||
make.size.mas_equalTo(CGSizeMake(139, 30));
|
||||
}else{
|
||||
make.size.mas_equalTo(CGSizeMake(179, 30));
|
||||
}
|
||||
}];
|
||||
|
||||
//分钟图片
|
||||
UIImageView *minueImageview = [[UIImageView alloc] init];
|
||||
minueImageview.image = [UIImage imageNamed:@"share_minute"];
|
||||
minueImageview.contentMode = UIViewContentModeScaleAspectFit;
|
||||
[self addSubview:minueImageview];
|
||||
[minueImageview mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.left.mas_equalTo(colorView.mas_left).offset(20);
|
||||
if (KMainW < 375) {
|
||||
//se 5s
|
||||
make.size.mas_equalTo(CGSizeMake(48, 49));
|
||||
|
||||
}else{
|
||||
make.size.mas_equalTo(CGSizeMake(72, 49));
|
||||
}
|
||||
make.top.mas_equalTo(jianyiImageView.mas_bottom).offset(20);
|
||||
|
||||
}];
|
||||
|
||||
//时间⌚️
|
||||
UILabel *timeLabel = [[UILabel alloc] init];
|
||||
timeLabel.textColor = [UIColor blackColor];
|
||||
if (KMainW < 375) {
|
||||
timeLabel.font = GIGA_TEXTFONTBOLD(24);
|
||||
}else{
|
||||
timeLabel.font = GIGA_TEXTFONTBOLD(35);
|
||||
}
|
||||
timeLabel.text = @"17";
|
||||
self.timeLabel = timeLabel;
|
||||
[self addSubview:timeLabel];
|
||||
[timeLabel sizeToFit];
|
||||
[timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(minueImageview.mas_left).offset(0);
|
||||
make.centerY.mas_equalTo(minueImageview.mas_centerY);
|
||||
|
||||
}];
|
||||
|
||||
[self bringSubviewToFront:jianyiImageView];
|
||||
[self bringSubviewToFront:minueImageview];
|
||||
[self bringSubviewToFront:timeLabel];
|
||||
@@ -125,6 +126,7 @@
|
||||
}
|
||||
|
||||
- (void)layoutSubviews{
|
||||
|
||||
[super layoutSubviews];
|
||||
[self drawViewInView:self.colorView backColor:GIGA_MAIN_BGCOLOR];
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
[lastLabe mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
make.centerY.mas_equalTo(logo.mas_centerY);
|
||||
make.centerX.mas_equalTo(self.mas_centerX);
|
||||
make.left.mas_equalTo(logo.mas_right).offset(5);
|
||||
}];
|
||||
|
||||
//3
|
||||
|
||||
Reference in New Issue
Block a user