title: Parsing XML - loading images from URLs
body: <p>I'm parsing an XML file that has links to pictures and I'm trying to display them in a UITableView. For some reason they're not appearing in the view. I don't think the problem has anything to do with my parsing script, because it's working to display text in the table. Here's my code for displaying the pictures:</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  
  {
      static NSString *CellIdentifier = @"Cell";
  
       Tweet *currentTweet = [[xmlParser tweets] objectAtIndex:indexPath.row];
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
  
      if (cell == nil)
  
      {
  
          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
  
  
          CGRect imageFrame = CGRectMake(2, 8, 40, 40);
  
          UIImageView *customImage = [[UIImageView alloc] initWithFrame:imageFrame];
  
          customImage.tag = 0013;
  
          [cell.contentView addSubview:customImage];
  
  
      }
  
      UIImageView *customImage = (UIImageView *)[cell.contentView viewWithTag:0013];
  
      customImage.image = [UIImage imageWithData:[NSData dataWithContentsOfURL: [NSURL URLWithString:[currentTweet pic]]]];
  
      return cell;
  
  }
  </code></pre>
  
  <p>Do I have to load up the images first maybe? If so how can I do that since I only get the urls to the image once I parse the xml?</p>
  
  <p>Thx for any help
  Antoine</p>