UILabel* content = [[UILabel alloc] init] ;
content.text = @"good"
NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:content.text];
NSRange strRange = {0,[str length]};
[str addAttribute:NSUnderlineStyleAttributeName value:[NSNumber numberWithInteger:NSUnderlineStyleSingle] range:strRange];
[content setAttributedText:str];
网友评论