// // RegAlertView.m // yunbaolive // // Created by YB007 on 2020/4/29. // Copyright © 2020 cat. All rights reserved. // #import "RegAlertView.h" #import "PubH5.h" @implementation RegAlertView +(instancetype)showRegAler:(NSDictionary *)dataDic complete:(RegAlertBlock)complete;{ RegAlertView *regView = [[[NSBundle mainBundle]loadNibNamed:@"RegAlertView" owner:nil options:nil]objectAtIndex:0]; regView.regAlertEvent = complete; [regView setupView:dataDic]; return regView; } -(void)setupView:(NSDictionary *)dataDic { [_agreeBtn setTitle:YZMsg(@"同意") forState:0]; [_notAgreeBtn setTitle:YZMsg(@"暂不使用") forState:0]; self.frame = CGRectMake(0, 0, _window_width, _window_height); self.backgroundColor = RGB_COLOR(@"#000000", 0.4); [[YBBaseAppDelegate sharedAppDelegate].topViewController.view addSubview:self]; _titleL.text = minstr([dataDic valueForKey:@"title"]); _contentL.text = minstr([dataDic valueForKey:@"content"]); _contentL.textColor = RGB_COLOR(@"#323232", 1); _contentL.font = SYS_Font(15); _contentL.numberOfLines = 0; NSArray *ppA = [NSArray arrayWithArray:[dataDic valueForKey:@"message"]]; NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@",_contentL.text]]; [textAtt addAttribute:NSForegroundColorAttributeName value:RGB_COLOR(@"#323232", 1) range:textAtt.yy_rangeOfAll]; for (int i=0; i