一行文字 要显示成 一行文字
不需要用不同的两个Label进行拼接 今儿个就放个方法进来
UILabel * o_priceLabel = [[UILabel alloc]init];
o_priceLabel.text = @"一行文字";
o_priceLabel.textAlignment = NSTextAlignmentRight;
o_priceLabel.textColor = [UIColor redColor];
o_priceLabel.font = [UIFont systemFontOfSize:17];
[cell.contentView addSubview:o_priceLabel];
NSRange newO_priceRange = NSMakeRange(0,2);
NSMutableAttributedString * pricestr = [[NSMutableAttributedString alloc]initWithString:@"<span style="font-family: Arial, Helvetica, sans-serif;">一行文字</span><span style="font-family: Arial, Helvetica, sans-serif;">"];</span>
[pricestr addAttributes: @{NSForegroundColorAttributeName:[UIColor grayColor],NSFontAttributeName:[UIFont systemFontOfSize:12]} range:newO_priceRange];
[o_priceLabel setText:@"一行文字"];
[o_priceLabel setAttributedText:pricestr];