数据未在UILabel中显示

时间:2015-11-21 22:12:49

标签: ios objective-c

有趣的困境:'变体的数据'成功退回,由于某种原因,它不会显示在我的手机UILabel中(UILabel看起来是空的,是的,它已经连接起来了#39;)?我的currencyFormatter是以某种方式抛出这个吗?我应该以不同方式格式化这一行感谢帮助。

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{

    static NSString *PointsTableIdentifier = @"PointsCell";

    PointsCell *cell = (PointsCell *)[tableView dequeueReusableCellWithIdentifier:PointsTableIdentifier];
    if (cell == nil)
    {
        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"PointsCell" owner:self options:nil];
        cell = [nib objectAtIndex:0];


        BUYProduct *productsbuy = self.products[indexPath.row];
        cell.productLabel.text = productsbuy.title;

        BUYProduct *productDescription = self.products[indexPath.row];
        cell.productDescrip.text = productDescription.htmlDescription;


        BUYProduct *pointValues = self.products[indexPath.row];
        BUYProductVariant *variant = pointValues.variants.firstObject;
        cell.priceLabel.text = [self.currencyFormatter stringFromNumber: variant.price];

        NSLog(@"%@", variant.price);

    }


    return cell;

}

0 个答案:

没有答案