UILable


/显示下划线

//中划线

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

//下划线

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

 NSMutableAttributedString*attribtStr = [[NSMutableAttributedString alloc]initWithString:old Strattributes:attribtDic];

oldPriceLabel.attributedText= attribtStr;

UILable 设置左右边距之后显示不完整.设置属性

[self.placeLabel sizeToFit];

self.placeLabel.adjustsFontSizeToFitWidth =YES;

你可能感兴趣的:(UILable)