0
我正在構建帶有自定義TableCell's的TableView。並填充細胞的我解析一些jSON。問題是我可以在兩個標籤中顯示文本,但出於某種原因,圖像沒有顯示在ImageView中。自定義單元格中的UIImageView中沒有圖像
我TableCell.h類
@property (strong, nonatomic) IBOutlet UIImageView *cellImage;
@property (strong, nonatomic) IBOutlet UILabel *storePhone;
@property (strong, nonatomic) IBOutlet UILabel *storeAddress;
我TableViewController.m類
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
TableCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
NSDictionary *tempDictionary= [self.storeArray objectAtIndex:indexPath.row];
cell.storePhone.text = [tempDictionary objectForKey:@"phone"];
cell.storeAddress.text = [tempDictionary objectForKey:@"address"];
UIImage *storeImage = [UIImage imageNamed:[tempDictionary objectForKey:@"storeLogoURL"]];
[cell.cellImage setImage:storeImage];
return cell;
}
我也是用AFNetworking框架解析JSON。