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]}];


猜你喜欢

转载自blog.csdn.net/u014640208/article/details/50921999