防止精度的损失 最好用float 不用double;
self.orderCost.text = [NSStringstringWithFormat:@"%.1f元",self.order.cost.floatValue];
%.1f 表示小数点一位,%.2f 表示小数点2位,依次类推.
防止精度的损失 最好用float 不用double;
self.orderCost.text = [NSStringstringWithFormat:@"%.1f元",self.order.cost.floatValue];
%.1f 表示小数点一位,%.2f 表示小数点2位,依次类推.