2011-08-18 40 views
0

Iam開發一個應用程序。我使用4行進行表視圖。每行包含imageview.Every imageview可以從CAMERA中獲取圖像。我的問題是獲取第三張圖像後,圖像會出現在不同的位置.ANd如果你滾動桌面視圖圖像會得到黑色。圖像沒有出現。請告訴我如何解決這個問題。是否這個記憶問題或不。告訴我。如何處理tableview中的兩個以上的圖像?

+0

發佈您的''''''''''''''''代碼。 – Akshay

+3

please改進你的問題。我很難readit。 – Robert

回答

0

看看這個,

UIImageView *backgroundCellImage=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 768, 80)]; 
     backgroundCellImage.image=[UIImage imageNamed:@"ImageName1.png"]; 

UIImageView *separatorImage=[[UIImageView alloc] initWithFrame:CGRectMake(100, 0, 62, 80)]; 
separatorImage.image=[UIImage imageNamed:@"ImageName2.png"]; 


    [cell.contentView addSubview:backgroundCellImage]; 
      [cell.contentView addSubview:separatorImage]; 
      [backgroundCellImage release]; 
      [separatorImage release]; 
0

我也有類似的問題,如果我理解正確。如果您使用dequeueReusableCellWithIdentifier來獲取您的單元格(您應該這樣做),那麼您將需要設置單元格的所有屬性的值,否則將從先前的單元格中留下垃圾。

例如:

cell.detailedTextLabel.text = @""; 

如果這個特定單元沒有detailedText。正如@Akshay說你需要發佈你的cellForRow代碼,以便我們看到發生了什麼。

+0

iam使用cell.detailTextLabel.text = @「」; –