donc j'ai eu le code suivant:UITableViewCell imageView ne montrant
- (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;
}
Cependant, je ne suis pas voir la imageView dans la cellule. Qu'est-ce que je fais mal?
nous allons voir votre méthode de -setImageWithURL – shabbirv
En plus de voir 'setImageWithURL:', êtes-vous sûr ** 'fd.imageUrl_' ** est non nul? – WrightsCS
oui l'url est valide et n'est pas nulle – adit