Commit 3beeb052 cgx

优化注销账号弹框

1 个父辈 85f464a5
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
@property (nonatomic, strong) UIView *alertView; @property (nonatomic, strong) UIView *alertView;
@property (nonatomic, strong) UILabel *titleLab; @property (nonatomic, strong) UILabel *titleLab;
@property (nonatomic, strong) UIImageView *cryIV; @property (nonatomic, strong) UIImageView *cryIV;
@property (nonatomic, strong) UILabel *redLab; @property (nonatomic, strong) UILabel *redLab1;
@property (nonatomic, strong) UILabel *redLab2;
@property (nonatomic, strong) UILabel *redLab3;
@property (nonatomic, strong) UIView *dealView; @property (nonatomic, strong) UIView *dealView;
@property (nonatomic, strong) UIButton *closeBtn; @property (nonatomic, strong) UIButton *closeBtn;
@property (nonatomic, strong) NSTimer *closeTimer; @property (nonatomic, strong) NSTimer *closeTimer;
...@@ -84,9 +86,18 @@ ...@@ -84,9 +86,18 @@
[_alertView addSubview:self.titleLab]; [_alertView addSubview:self.titleLab];
[_alertView addSubview:self.cryIV]; [_alertView addSubview:self.cryIV];
[_alertView addSubview:self.redLab]; [_alertView addSubview:self.redLab1];
[_alertView addSubview:self.redLab2];
[_alertView addSubview:self.redLab3];
[_alertView addSubview:self.dealView]; [_alertView addSubview:self.dealView];
UILabel *dotLab1 = [UILabel labWithText:@"•" textColor:ColorFromHex(0xF04B77) font:SysFont(14.0)];
[_alertView addSubview:dotLab1];
UILabel *dotLab2 = [UILabel labWithText:@"•" textColor:ColorFromHex(0xF04B77) font:SysFont(14.0)];
[_alertView addSubview:dotLab2];
UILabel *dotLab3 = [UILabel labWithText:@"•" textColor:ColorFromHex(0xF04B77) font:SysFont(14.0)];
[_alertView addSubview:dotLab3];
[self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) { [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(_alertView).offset(20); make.top.equalTo(_alertView).offset(20);
make.centerX.equalTo(_alertView); make.centerX.equalTo(_alertView);
...@@ -97,9 +108,34 @@ ...@@ -97,9 +108,34 @@
make.width.equalTo(@198); make.width.equalTo(@198);
make.height.equalTo(@186); make.height.equalTo(@186);
}]; }];
[self.redLab mas_makeConstraints:^(MASConstraintMaker *make) { [dotLab1 mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.cryIV.mas_bottom).offset(23); make.top.equalTo(self.cryIV.mas_bottom).offset(20);
make.left.equalTo(_alertView).offset(15);
make.width.equalTo(@8);
}];
[self.redLab1 mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(dotLab1);
make.left.equalTo(dotLab1.mas_right).offset(8);
make.right.equalTo(_alertView).offset(-15);
}];
[dotLab2 mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.redLab1.mas_bottom).offset(10);
make.left.equalTo(_alertView).offset(15);
make.width.equalTo(@8);
}];
[self.redLab2 mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(dotLab2);
make.left.equalTo(dotLab2.mas_right).offset(8);
make.right.equalTo(_alertView).offset(-15);
}];
[dotLab3 mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.redLab2.mas_bottom).offset(10);
make.left.equalTo(_alertView).offset(15); make.left.equalTo(_alertView).offset(15);
make.width.equalTo(@8);
}];
[self.redLab3 mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(dotLab3);
make.left.equalTo(dotLab3.mas_right).offset(8);
make.right.equalTo(_alertView).offset(-15); make.right.equalTo(_alertView).offset(-15);
}]; }];
[self.dealView mas_makeConstraints:^(MASConstraintMaker *make) { [self.dealView mas_makeConstraints:^(MASConstraintMaker *make) {
...@@ -127,13 +163,30 @@ ...@@ -127,13 +163,30 @@
return _cryIV; return _cryIV;
} }
- (UILabel *)redLab { - (UILabel *)redLab1 {
if (!_redLab) { if (!_redLab1) {
NSString *str = @"• 您仅可注销您本人申请的账号\n\n• 注销后,账号的全部权益将被清除备份\n\n• 注销后,账号下的所有数据、记录等将无法访问或找回"; NSString *str = @"您仅可注销您本人申请的账号";
_redLab = [UILabel labWithText:str textColor:ColorFromHex(0xF04B77) font:SysFont(14.0)]; _redLab1 = [UILabel labWithText:str textColor:ColorFromHex(0xF04B77) font:SysFont(14.0)];
_redLab.numberOfLines = 0; }
return _redLab1;
}
- (UILabel *)redLab2 {
if (!_redLab2) {
NSString *str = @"注销后,账号的全部权益将被清除(包含并不限于会员、积分、虚拟货币等)";
_redLab2 = [UILabel labWithText:str textColor:ColorFromHex(0xF04B77) font:SysFont(14.0)];
_redLab2.numberOfLines = 0;
}
return _redLab2;
}
- (UILabel *)redLab3 {
if (!_redLab3) {
NSString *str = @"注销后,账号下的所有数据、记录等将无法访问或找回(包含并不限于睡眠数据,评测结果等)";
_redLab3 = [UILabel labWithText:str textColor:ColorFromHex(0xF04B77) font:SysFont(14.0)];
_redLab3.numberOfLines = 0;
} }
return _redLab; return _redLab3;
} }
- (UIView *)dealView { - (UIView *)dealView {
......
...@@ -151,8 +151,8 @@ ...@@ -151,8 +151,8 @@
make.height.equalTo(@(meH)); make.height.equalTo(@(meH));
}]; }];
[bgBtn mas_makeConstraints:^(MASConstraintMaker *make) { [bgBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(self.meLab.mas_bottom).offset(30);
make.left.right.bottom.equalTo(self.userInfoView); make.left.right.bottom.equalTo(self.userInfoView);
make.height.equalTo(@60);
}]; }];
[self.portraitIV mas_makeConstraints:^(MASConstraintMaker *make) { [self.portraitIV mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.equalTo(bgBtn); make.top.equalTo(bgBtn);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!