IOS 设置label中划线
NSDictionary *dic = @{NSStrikethroughStyleAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle],
NSFontAttributeName:KSYSTEM_FONT_12,
NSForegroundColorAttributeName:KCOLOR_GRAY_LIGHT};
NSString *str = [NSString stringWithFormat:@"¥%.2f",[list.marketPrice floatValue]];
NSMutableAttributedString *oldPriceAtt = [[NSMutableAttributedString alloc] initWithString:str attributes:dic];
IOS 设置label下划线
NSDictionary *dic = @{NSUnderlineStyleAttributeName:[NSNumber numberWithInteger:NSUnderlineStyleSingle]};
NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:@"123" attributes:dic];
网友评论