Więc miałem następujący kod:UITableViewCell ImageView nie pokazując
- (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;
}
Jednak nie jestem widząc ImageView w komórce. Co ja robię źle?
zobaczmy metoda -setImageWithURL – shabbirv
wraz z widząc 'setImageWithURL:', jesteś pewien, że ** 'fd.imageUrl_' ** nie jest zerowa? – WrightsCS
tak, adres URL jest ważny i nie jest zerowy – adit