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

#import "ProductPurchaseBottomView.h"

@implementation ProductPurchaseBottomView
- (void)awakeFromNib
{
    [super awakeFromNib];
    
    self.lb_xieyi.attributedText = [self attributedStrWithFaultCode:@"相关协议"];
}

#pragma mark - private methods
- (NSAttributedString *) attributedStrWithFaultCode:(NSString *)faultCode {
    
    NSString* text = [NSString stringWithFormat:@"我已阅读%@，理解其内容并承担相关风险",faultCode];
    NSMutableAttributedString * faultCode_ = [[NSMutableAttributedString alloc] initWithString:text];
    
    
    NSDictionary * faultCodeAttributes = @{NSForegroundColorAttributeName:[UIColor colorWithHex:0x137ef6]};
    [faultCode_ setAttributes:faultCodeAttributes 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
