UILabel,文字添加下划线,中划线

        //显示下划线

        //中划线

//        NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};

        //下划线

        NSDictionary *attribtDic = @{NSUnderlineStyleAttributeName: [NSNumbernumberWithInteger:NSUnderlineStyleSingle]};

        NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:oldStrattributes:attribtDic];

        oldPriceLabel.attributedText = attribtStr;

原文地址:https://www.cnblogs.com/starainDou/p/5679011.html