//
//  ElectAccountFaceVerityView.m
//  Open
//
//  Created by 雷俊博 on 2020/7/30.
//  Copyright © 2020 黄江涛 . All rights reserved.
//

#import "ElectAccountFaceVerityView.h"

@implementation ElectAccountFaceVerityView

- (void)awakeFromNib
{
    [super awakeFromNib];
    
    NSString*text = @"我已阅读相关协议，理解其内容并承担相关风险";
    self.lb_xieyi.attributedText = [self attributedStrWithFaultCode:text];
    
    
}

- (NSAttributedString *) attributedStrWithFaultCode:(NSString *)faultCode {
    NSMutableAttributedString * faultCode_ = [[NSMutableAttributedString alloc] initWithString:faultCode];
    
    NSMutableParagraphStyle *paraStyle = [[NSMutableParagraphStyle alloc] init];
    
    NSDictionary * faultCodeAttributes = @{ NSFontAttributeName:[UIFont systemFontOfSize:13],NSParagraphStyleAttributeName:paraStyle,NSForegroundColorAttributeName:[UIColor colorWithHex:0x808080]};
    [faultCode_ setAttributes:faultCodeAttributes range:NSMakeRange(0,faultCode_.length)];
    
    [faultCode_ addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHex:0x137ef6] range:NSMakeRange(4, 4)];
    
    return faultCode_;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
