Ios UITableViewCell内容不显示

Ios UITableViewCell内容不显示,ios,objective-c,xcode,uitableview,Ios,Objective C,Xcode,Uitableview,我有一个委托方法,它检索每个单元格的内容,如下所示: -(void)getRetrievedShopContentStickerName:(NSArray *)stickerNameArray price:(NSArray *)stickerPriceArray profileBackgroundImage:(NSArray *)stickerProfileBackgroundImageArray profile:(NSArray *)stickerProfileImageArray profi

我有一个委托方法,它检索每个单元格的内容,如下所示:

-(void)getRetrievedShopContentStickerName:(NSArray *)stickerNameArray price:(NSArray *)stickerPriceArray profileBackgroundImage:(NSArray *)stickerProfileBackgroundImageArray profile:(NSArray *)stickerProfileImageArray profileMenuImage:(NSArray *)stickerProfileMenuImageArray designerName:(NSArray *)designerNameArray
{
    self.stickerPriceArray = [[NSMutableArray alloc] initWithArray:stickerPriceArray];
    self.stickerProfileBGImageArray = [[NSMutableArray alloc] initWithArray:stickerProfileBackgroundImageArray];

    NSLog(@"sticker price: %@", self.stickerPriceArray);
    NSLog(@"sticker bg: %@", self.stickerProfileBGImageArray);

    [self.shopTableView reloadData];
}
此委托方法按预期注销工作数组。这是我用来显示表视图内容的代码:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return self.stickerPriceArray.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

    if (cell == nil)
    {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];

        AsyncImageView *backgroundImage = [[AsyncImageView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)]; //does cell frame get before this method?
        [backgroundImage setTag:123];
        [cell.contentView addSubview:backgroundImage];

        UILabel *priceLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 250, 250)];
        [priceLabel setTag:124];
        [priceLabel setFont:[UIFont fontWithName:@"Helvetica-Light" size:30.0f]];
        [priceLabel setTextColor:[UIColor blackColor]];
        [cell.contentView addSubview:priceLabel];
    }

    [(AsyncImageView *)[cell.contentView viewWithTag:123] loadImageWithTypeFromURL:[NSURL URLWithString:[self.stickerProfileBGImageArray objectAtIndex:indexPath.row]] contentMode:UIViewContentModeScaleAspectFit imageNameBG:nil];
    [(UILabel *)[cell.contentView viewWithTag:124] setText:[self.stickerPriceArray objectAtIndex:indexPath.row]];

    return cell;
}

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 100;
}
在委托方法中重新加载表视图后,我得到的唯一更改是每个tableviewcell的高度。为什么我的内容没有显示出来?我做错了什么


提前感谢

我不小心在故事板中设置了单元格的标识符,因此从未调用过
if(cell==nil)

tableView的数据源和委托如何?它是否绑定到viewController?@ingaham是的。断点工作…stickerPriceArray是一个强大的属性(我假设是,但要确定)?getRetrievedShopContentStickerName在主线程上被调用?奇怪的是,backgroundImage和priceLabel的框架比单元格大小大很多。你试过“普通”尺码吗?