Così ho avuto il seguente codice:UITableViewCell ImageView non mostrando
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *CellIdentifier = @"FriendsCell";
FriendData * fd = [self.friendsDataSource_ objectAtIndex:indexPath.row];
UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
[cell.imageView setImageWithURL:[NSURL URLWithString:fd.imageUrl_]];
[cell.imageView setFrame:CGRectMake(0, 0, 30, 30)];
[cell.textLabel setText:fd.name_];
return cell;
}
Tuttavia, non sto vedendo l'IMAGEVIEW nella cella. Che cosa sto facendo di sbagliato?
vediamo il metodo -setImageWithURL – shabbirv
Insieme a vedere 'setImageWithURL:', sei sicuro che ** 'fd.imageUrl_' ** non è pari a zero? – WrightsCS
sì l'url è valido e non è nil – adit