IOS 设置label中划线、下划线

IOS 设置label中划线

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


你可能感兴趣的:(NSString)