iOS 给label的中间加一条横线

NSDictionary*attribtDic =@{NSStrikethroughStyleAttributeName: [NSNumbernumberWithInteger:NSUnderlineStyleSingle]};NSMutableAttributedString*attribtStr = [[NSMutableAttributedStringalloc]initWithString:_allMoney.textattributes:attribtDic];

//赋值_allMoney.attributedText= attribtStr;

你可能感兴趣的:(iOS 给label的中间加一条横线)