|
@@ -26,7 +26,12 @@
|
|
|
{
|
|
|
if (self.alertClick) {
|
|
|
self.alertClick(btn.tag - 6688);
|
|
|
- [self removeFromSuperview];
|
|
|
+ [UIView animateWithDuration:0.2 animations:^{
|
|
|
+ btn.backgroundColor = SLColSel;
|
|
|
+ }];
|
|
|
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
|
|
+ [self removeFromSuperview];
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -253,8 +258,12 @@
|
|
|
make.height.equalTo(@(0.0));
|
|
|
}];
|
|
|
|
|
|
- self.sureBtn.backgroundColor = SLBlueColor;
|
|
|
- self.cancelBtn.backgroundColor = [SLBlueColor colorWithAlphaComponent:0.1];
|
|
|
+ [self.sureBtn setBackgroundImage:ImageName(@"icon_btn_blue") forState:UIControlStateNormal];
|
|
|
+ [self.sureBtn setBackgroundImage:ImageName(@"icon_btn_blue_sel") forState:UIControlStateHighlighted];
|
|
|
+ UIImage *blueImg = [UIImage imageWithColor:[SLBlueColor colorWithAlphaComponent:0.1] size:CGSizeMake(110, 50)];
|
|
|
+ UIImage *blueSelImg = [UIImage imageWithColor:[SLBlueSelColor colorWithAlphaComponent:0.1] size:CGSizeMake(110, 50)];
|
|
|
+ [self.cancelBtn setBackgroundImage:blueImg forState:UIControlStateNormal];
|
|
|
+ [self.cancelBtn setBackgroundImage:blueSelImg forState:UIControlStateHighlighted];
|
|
|
if (!hasCancelBtn) {
|
|
|
[self.sureBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
make.top.equalTo(self.lineView.mas_bottom);
|
|
@@ -448,6 +457,7 @@
|
|
|
if (!_sureBtn) {
|
|
|
_sureBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
|
|
_sureBtn.titleLabel.font = [UIFont systemFontOfSize:16];
|
|
|
+ _sureBtn.clipsToBounds = YES;
|
|
|
[_sureBtn setTitleColor:SLColor(@"#EB2B2B") forState:UIControlStateNormal];
|
|
|
[_sureBtn addTarget:self action:@selector(sureAction) forControlEvents:UIControlEventTouchUpInside];
|
|
|
[self.alertView addSubview:_sureBtn];
|
|
@@ -460,6 +470,7 @@
|
|
|
if (!_cancelBtn) {
|
|
|
_cancelBtn = [UIButton buttonWithType:UIButtonTypeCustom];
|
|
|
_cancelBtn.titleLabel.font = [UIFont systemFontOfSize:16];
|
|
|
+ _cancelBtn.clipsToBounds = YES;
|
|
|
[_cancelBtn setTitleColor:SLColor(@"#333333") forState:UIControlStateNormal];
|
|
|
[_cancelBtn addTarget:self action:@selector(cancelAction) forControlEvents:UIControlEventTouchUpInside];
|
|
|
[self.alertView addSubview:_cancelBtn];
|