UILabel加各种线条

来源:互联网 发布:深圳市软件企业 编辑:程序博客网 时间:2024/04/28 07:05

        //显示下划线

        //中划线

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

        //下划线

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

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

        oldPriceLabel.attributedText = attribtStr;





        //显示下划线

        //中划线

//        NSDictionary *attribtDic = 

@{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]};

        //下划线

        NSDictionary *attribtDic = 

@{NSUnderlineStyleAttributeName: [NSNumbernumberWithInteger:NSUnderlineStyleSingle]};

        NSMutableAttributedString *attribtStr =

 [[NSMutableAttributedString alloc]initWithString:oldStrattributes:attribtDic];

        oldPriceLabel.attributedText = attribtStr;


1 0