Iphone: XML image problem
Posted
by avanadra
on Stack Overflow
See other posts from Stack Overflow
or by avanadra
Published on 2010-06-17T13:34:09Z
Indexed on
2010/06/17
13:43 UTC
Read the original article
Hit count: 202
Hi! I have a question about parsing XML and putting it into a table. I parsed the following elements from a RSS feed : title, dc:creator and enclosure url (= an image).
The parsing is working, i can see everything showing up in the console. But when i try to load everything into the tablecell, everything shows up except for the image. So i figured that the problem must be in the CellForRowatIndexPath method in the RootViewController.m ( or in the TableCell.m)
What am i doing wrong? Please help! Ive been struggling for days with this and just cant seem to figure it out!
Heres the CellForRowatIndexPath:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
WerkTableCell *cell = (WerkTableCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
[[NSBundle mainBundle] loadNibNamed:@"WerkCell" owner:self options:nil];
cell =self.werkCell;
}
// Configure the cell.
NSMutableArray *cont= [xmlcont items];// is niet in tablevb v. PS
ItemData *current =[cont objectAtIndex:indexPath.row];
cell.titelLabel.text = [current titel];
cell.makerLabel.text = [current maker];
cell.thumbImage.image = [UIImage imageNamed:[current image]];
return cell;
}
© Stack Overflow or respective owner