/**
* ZY CODE
*
* 给Label设置下划线
*/
+(void)setLabelUnderline:(UILabel *)label{
NSMutableAttributedString *content = [[NSMutableAttributedString alloc] initWithString:label.text];
NSRange contentRange = {0, [content length]};
[content addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:contentRange];
label.attributedText = content;
}
/**
* ZY CODE
*
* 给Label设置中划线
*/
+(void)setLabelUnderline:(UILabel *)label{
NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};
NSMutableAttributedString *content = [[NSMutableAttributedString alloc]initWithString:label.text attributes:attribtDic];
label.attributedText = content;
}