2010-06-17 1 views
0

XML을 파싱하고 테이블에 넣는 것에 대해 질문이 있습니다. 제목, DC : 나는 RSS 피드에서 다음 요소를 분석 창조자인클로저 URL (= 이미지).Iphone : XML 이미지 문제

구문 분석이 작동하며 콘솔에 모든 항목이 표시 될 수 있습니다. 하지만 테이블 셀에 모든 것을로드하려고하면 이미지를 제외하고 모든 것이 나타납니다. 그래서 문제가 RootViewController.m (또는 TableCell.m)의 CellForRowatIndexPath 메소드에 있어야한다고 생각했습니다.

무엇이 잘못 되었나요? 도와주세요! Ive는 이것을 가진 며칠 동안 고투하고있다 그리고 다만 위선적 인 말은 그것을 파악하는 것을 보인다!

을 heres 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; 
} 

답변

0

imageNamed:는 로컬 파일을로드합니다. 모든 URL에서 URL이 원격 파일을 가리키고 있으므로 웹 서버에서 가져 와서 테이블에로드해야합니다.